Skip to content

Commit b9945ed

Browse files
committed
added primary button
Signed-off-by: Efren Lim <[email protected]>
1 parent 3a06513 commit b9945ed

File tree

8 files changed

+34
-4
lines changed

8 files changed

+34
-4
lines changed

projects/lfx-component-lib/documentation.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218
"deprecated": false,
219219
"deprecationMessage": "",
220220
"type": "Meta<ButtonsComponent>",
221-
"defaultValue": "{\n title: 'LFX Components/Controls/Buttons',\n component: ButtonsComponent,\n tags: ['autodocs'],\n render: (args) => ({\n template: `\n <lfx-buttons [type]=\"primary\">\n <span>Button Text</span>\n </lfx-buttons>\n `,\n }),\n}"
221+
"defaultValue": "{\n title: 'LFX Components/Controls/Buttons',\n component: ButtonsComponent,\n tags: ['autodocs'],\n render: (args) => ({\n template: `\n <lfx-buttons type=\"primary\">\n <i class=\"fa-sharp fa-light fa-file-chart-column\"></i>\n <span>Button Text</span>\n <i class=\"fa-sharp fa-light fa-arrow-right\"></i>\n </lfx-buttons>\n `,\n }),\n}"
222222
},
223223
{
224224
"name": "Notice",
@@ -613,7 +613,7 @@
613613
"deprecated": false,
614614
"deprecationMessage": "",
615615
"type": "Meta<ButtonsComponent>",
616-
"defaultValue": "{\n title: 'LFX Components/Controls/Buttons',\n component: ButtonsComponent,\n tags: ['autodocs'],\n render: (args) => ({\n template: `\n <lfx-buttons [type]=\"primary\">\n <span>Button Text</span>\n </lfx-buttons>\n `,\n }),\n}"
616+
"defaultValue": "{\n title: 'LFX Components/Controls/Buttons',\n component: ButtonsComponent,\n tags: ['autodocs'],\n render: (args) => ({\n template: `\n <lfx-buttons type=\"primary\">\n <i class=\"fa-sharp fa-light fa-file-chart-column\"></i>\n <span>Button Text</span>\n <i class=\"fa-sharp fa-light fa-arrow-right\"></i>\n </lfx-buttons>\n `,\n }),\n}"
617617
}
618618
],
619619
"projects/lfx-component-lib/src/lib/containers/toast/__docs__/toast.stories.ts": [

projects/lfx-component-lib/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@
3232
},
3333
"./colors": {
3434
"sass": "./styles/colors.scss"
35+
},
36+
"./controls": {
37+
"sass": "./styles/controls.scss"
38+
},
39+
"./all": {
40+
"sass": "./styles/index.scss"
3541
}
3642
}
3743
}

projects/lfx-component-lib/src/lib/controls/buttons/__docs__/buttons.stories.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ const meta: Meta<ButtonsComponent> = {
2020
render: (args) => ({
2121
template: `
2222
<lfx-buttons type="primary">
23+
<i class="fa-sharp fa-light fa-file-chart-column"></i>
2324
<span>Button Text</span>
25+
<i class="fa-sharp fa-light fa-arrow-right"></i>
2426
</lfx-buttons>
2527
`,
2628
}),
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
<button class="lfx-button lfx-button--{{ type().toLowerCase() }}">
2-
<i class="fa-solid fa-user"></i>
32
<ng-content />
43
</button>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
1+
@import "../../styles/constants.scss";
12
@import "../../styles/mixins/color-mixins.scss";
23

34
.lfx-button {
5+
padding: 0.75rem 1.75rem;
6+
border: 0;
7+
border-radius: $dim-8;
8+
display: flex;
9+
align-items: center;
10+
gap: $dim-4;
11+
cursor: pointer;
412
&.lfx-button--primary {
513
@include primary-color;
14+
@include text-white;
15+
16+
&:hover {
17+
background-color: $blue-700;
18+
}
19+
20+
&:active {
21+
background-color: $blue-800;
22+
}
623
}
724
}

projects/lfx-component-lib/src/lib/styles/colors.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
@import "./mixins/color-mixins.scss";
77

88
// default text colors
9-
*,
9+
html,
10+
body,
1011
.text-primary {
1112
@include text-primary-color;
1213
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import "../controls/buttons/buttons.component.scss";

projects/lfx-component-lib/src/lib/styles/mixins/color-mixins.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ $secondary-text-color: $grey-500;
2121
color: $secondary-text-color;
2222
}
2323

24+
@mixin text-white {
25+
color: $grey-0;
26+
}
27+
2428
@mixin message-color-notice {
2529
color: $primary-color;
2630
}

0 commit comments

Comments
 (0)