Skip to content

feat(Notifications): Responsive layout | JIRA: PT-85 #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 23 additions & 12 deletions src/assets/css/notifications.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ body {
.el-alert__title {
@apply text-sm font-semibold leading-8;
}
.el-icon.el-alert__close-btn {
@apply text-lg text-alert-closebtn top-6 font-semibold #{!important};
}

// Alerts - Custom
.el-alert.success {
Expand Down Expand Up @@ -114,9 +117,6 @@ body {
}

// Modals
.el-dialog {
@apply rounded-md w-4/12;
}
.el-dialog .el-button {
@apply py-5 px-5 border-transparent text-sm tracking-wide font-semibold;
}
Expand All @@ -132,6 +132,12 @@ body {
.open-notification .el-dialog__body .el-icon {
@apply text-5xl text-center #{!important};
}
.open-notification .el-dialog__body {
@apply mt-5 mb-5;
}
.open-notification .el-dialog__close {
@apply text-white opacity-60;
}
.modal-heading {
@apply font-semibold text-0.95 uppercase tracking-wide mb-2 mt-6 #{!important};
}
Expand All @@ -154,39 +160,36 @@ body {
@apply bg-transparent text-left-bar-indigo hover:translate-y-0 #{!important};
}
.open-notification .btn-open {
@apply bg-white hover:bg-white text-black #{!important};
@apply bg-white hover:bg-white text-black shadow-sm #{!important};
}

// Modals - Form
.el-dialog.open-form {
@apply w-1/4 rounded-md bg-mess-box-bg;
}

.open-form .el-dialog__header {
@apply hidden;
}

.open-form .el-dialog__body {
@apply flex flex-col items-center justify-center bg-white pt-0 rounded-md text-mess-box-text p-0 flex flex-col gap-4 text-center;
@apply flex flex-col items-center justify-center bg-white pt-0 rounded-md text-mess-box-text p-0 flex flex-col text-center;
}

.open-form-header {
@apply w-full pt-5 pb-12 border-b p-10;
}
.open-form-body {
@apply w-full p-10;
@apply w-full p-6 pt-5 md:px-10;
}
.open-form-title {
@apply mb-4 mt-2 text-center;
}
.open-form-title small {
@apply text-12.8 #{!important};
@apply text-12.8 mb-6 #{!important};
}
.open-form-header-body {
@apply flex justify-center gap-6;
@apply flex flex-wrap justify-center gap-3;
}
.btn {
@apply block flex justify-between items-center gap-3 py-2.5 px-5 shadow-md rounded-md hover:translate-y-0.25;
@apply block shadow-sm flex justify-between items-center gap-3 py-2.5 px-5 shadow-md rounded-md hover:translate-y-0.25;
}
.btn img {
@apply h-5 w-5;
Expand Down Expand Up @@ -227,4 +230,12 @@ body {
.el-form-item.el-form-item--default.form-input {
@apply w-full;
}

// Responsive
.el-dialog {
@apply w-97/100 sm:w-8/12 md:w-7/12 lg:w-6/12 xl:w-5/12 rounded-md;
}
.open-form {
@apply rounded-md bg-mess-box-bg w-97/100 md:w-96 #{!important};
}
}
7 changes: 2 additions & 5 deletions src/modules/notification/views/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="w-full sm:w-2/3 md:w-2/3 mx-auto">
<div class="w-full lg:w-2/3 mx-auto">
<!-- Alerts -->
<div class="card-typography">
<div class="card-header">
Expand All @@ -18,7 +18,7 @@
<h3 class="text-md">Modals</h3>
</div>

<div class="p-5 grid grid-cols-3 gap-6">
<div class="p-5 grid grid-cols-1 lg:grid-cols-3 lg:gap-6">
<!-- Modals - Default -->
<div class="w-full mb-4">
<el-button type="primary" size="large" class="w-full" text @click="openDefault = true"
Expand Down Expand Up @@ -318,9 +318,6 @@ export default defineComponent({
.card-header {
@apply p-5 border-b border-primary-white;
}
.row {
@apply my-8 w-full h-auto;
}
.title {
@apply uppercase text-80 font-semibold text-muted;
}
Expand Down