Skip to content

Commit 0cf9e82

Browse files
authored
Merge pull request #37 from ltv/feat/PT-60
feat(button): Design layout && style for button | JIRA: PT-60
2 parents fc708c8 + 2ac5315 commit 0cf9e82

File tree

8 files changed

+558
-65
lines changed

8 files changed

+558
-65
lines changed

src/assets/css/el-button.scss

Lines changed: 119 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,126 @@
11
body {
22
.el-button {
3-
background-color: var(--el-button-bg-color, var(--el-color-white));
43
&:hover {
54
@apply -translate-y-0.25;
65
}
76
}
7+
8+
.el-button.el-button--default.is-plain {
9+
@apply bg-transparent text-btn-default border-btn-default;
10+
&:hover {
11+
@apply bg-btn-default text-white drop-shadow-lg;
12+
}
13+
&:active {
14+
@apply drop-shadow-none;
15+
}
16+
}
17+
18+
.el-button.el-button--primary.is-plain {
19+
@apply bg-transparent text-primary-blue border-primary-blue;
20+
&:hover {
21+
@apply bg-primary-blue text-white drop-shadow-lg;
22+
}
23+
&:active {
24+
@apply drop-shadow-none;
25+
}
26+
}
27+
28+
.el-button.el-button--secondary.is-plain {
29+
@apply bg-transparent text-secondary border-slate-50 shadow-none;
30+
&:hover {
31+
@apply bg-slate-50 text-black drop-shadow-lg border-slate-50;
32+
}
33+
&:active {
34+
@apply drop-shadow-none bg-slate-50;
35+
}
36+
}
37+
38+
.el-button.el-button--success.is-plain {
39+
@apply bg-transparent text-success border-success;
40+
&:hover {
41+
@apply bg-success text-white drop-shadow-lg border-success;
42+
}
43+
&:active {
44+
@apply drop-shadow-none;
45+
}
46+
}
47+
48+
.el-button.el-button--warning.is-plain {
49+
@apply bg-transparent text-warning border-warning;
50+
&:hover {
51+
@apply bg-warning text-white drop-shadow-lg border-warning;
52+
}
53+
&:active {
54+
@apply drop-shadow-none;
55+
}
56+
}
57+
58+
.el-button.el-button--info.is-plain {
59+
@apply bg-transparent text-info border-info;
60+
&:hover {
61+
@apply bg-info text-white drop-shadow-lg border-info;
62+
}
63+
&:active {
64+
@apply drop-shadow-none;
65+
}
66+
}
67+
68+
.el-button.el-button--danger.is-plain {
69+
@apply bg-transparent text-danger border-danger;
70+
&:hover {
71+
@apply bg-danger text-white drop-shadow-lg border-danger;
72+
}
73+
&:active {
74+
@apply drop-shadow-none;
75+
}
76+
}
77+
78+
.el-button.el-button--primary {
79+
@apply bg-primary-blue border border-primary-blue text-white;
80+
&:active {
81+
@apply bg-primary-blue-active;
82+
}
83+
}
84+
85+
.el-button.el-button--info {
86+
@apply bg-info border border-info text-white;
87+
&:active {
88+
@apply bg-info-active;
89+
}
90+
}
91+
92+
.el-button.el-button--warning {
93+
@apply bg-warning border border-warning text-white;
94+
&:active {
95+
@apply bg-warning-active;
96+
}
97+
}
98+
99+
.el-button.el-button--success {
100+
@apply bg-success border border-success text-white;
101+
&:active {
102+
@apply bg-success-active;
103+
}
104+
}
105+
106+
.el-button.el-button--danger {
107+
@apply bg-danger border border-danger text-white;
108+
&:active {
109+
@apply bg-danger-active;
110+
}
111+
}
112+
113+
.el-button.el-button--secondary {
114+
@apply bg-slate-100 border border-slate-100 text-black shadow-md;
115+
&:active {
116+
@apply shadow-none border-slate-300 bg-slate-300;
117+
}
118+
}
119+
120+
.el-button.btn-default {
121+
@apply bg-btn-default border border-btn-default text-white;
122+
&:active {
123+
@apply bg-btn-default-active;
124+
}
125+
}
8126
}

src/assets/css/typography.scss

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ body {
4040
.heading-title {
4141
@apply uppercase text-1.375 text-primary font-semibold tracking-wide
4242
}
43-
.text-warning {
44-
@apply text-warnning
45-
}
4643
.lead {
4744
@apply text-xl font-light leading-1.7
4845
}

src/components/Navigation/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div
3-
class="flex items-center mx-0 py-4 px-2.5 md:px-7 shadow-sm bg-indigo-500 h-20 border border-indigo-500 border-b-slate-50/10"
3+
class="flex items-center mx-0 py-4 px-2.5 md:px-8 shadow-sm bg-primary-blue h-20 border border-primary-blue border-b-slate-50/10"
44
>
55
<div class="w-full items-center justify-between">
66
<div class="w-full flex basis-auto items-center">

src/components/Sidebar/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
>
4545
<span
4646
v-if="route.name === item.name"
47-
class="absolute flex inset-y-1 left-0 w-0.5 h-5/6 bg-indigo-500 rounded-tr-lg rounded-br-lg"
47+
class="absolute flex inset-y-1 left-0 w-0.5 h-5/6 bg-primary-blue rounded-tr-lg rounded-br-lg"
4848
aria-hidden="true"
4949
></span>
5050
<router-link

src/layouts/default-layout.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
:class="`${!isPin ? 'ml-14' : 'ml-64 cursor-pointer lg:cursor-default'}`"
77
>
88
<navigation />
9-
<div class="w-full h-20 relative bg-indigo-500">
10-
<div class="flex items-center py-5 mb-0 px-2.5 md:px-8 pt-6">
9+
<div class="w-full h-17 relative bg-primary-blue">
10+
<div class="flex items-center py-5 mb-0 px-2.5 md:px-8 pt-5">
1111
<div class="w-full flex flex-wrap flex-row">
1212
<div class="flex w-1/2">
1313
<div class="text-white text-xl font-semibold inline-block mb-0">
@@ -51,20 +51,20 @@
5151
<div class="w-1/2 text-right">
5252
<el-button
5353
size="small"
54-
class="w-11 h-7 shadow-lg font-semibold text-indigo-500 border-white hover:text-black hover:bg-white active:bg-slate-100"
54+
class="w-11 h-7 shadow-lg text-primary-blue bg-white border-white hover:text-black hover:bg-white active:bg-slate-100"
5555
>New</el-button
5656
>
5757
<el-button
5858
size="small"
59-
class="w-14 h-7 shadow-lg font-semibold text-indigo-500 border-white hover:text-black hover:bg-white active:bg-slate-100"
59+
class="h-7 shadow-lg text-primary-blue bg-white border-white hover:text-black hover:bg-white active:bg-slate-100"
6060
>Filters</el-button
6161
>
6262
</div>
6363
</div>
6464
</div>
6565
</div>
6666
<router-view v-slot="{ Component }">
67-
<div class="h-17 bg-indigo-500 px-2.5">
67+
<div class="h-19 bg-primary-blue px-2.5 sm:px-7.5 md:px-8">
6868
<component :is="Component" />
6969
</div>
7070
</router-view>

0 commit comments

Comments
 (0)