Skip to content

Commit cf698e0

Browse files
committed
feat(Icon): add new theme affecting strokes
1 parent c159a3f commit cf698e0

File tree

4 files changed

+76
-8
lines changed

4 files changed

+76
-8
lines changed

assets/css/_symbols.scss

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,104 @@
22

33
.theme--default {
44
fill:$PRIMARY_COLOR;
5+
6+
&--stroke {
7+
stroke:$PRIMARY_COLOR;
8+
}
59
}
610

711
.theme--primary-color {
812
fill: $PRIMARY_COLOR;
13+
14+
&--stroke {
15+
stroke:$PRIMARY_COLOR;
16+
}
917
}
1018

1119
.theme--primary-color-light {
1220
fill: $PRIMARY_COLOR_LIGHT;
21+
22+
&--stroke {
23+
stroke:$PRIMARY_COLOR_LIGHT;
24+
}
1325
}
1426

1527
.theme--secondary-color {
1628
fill: darken($SECONDARY_COLOR, 12);
29+
30+
&--stroke {
31+
stroke:darken($SECONDARY_COLOR, 12);
32+
}
1733
}
1834

1935
.theme--ternary-color {
2036
fill: $TERNARY_COLOR;
37+
38+
&--stroke {
39+
stroke:$TERNARY_COLOR;
40+
}
2141
}
2242

2343
.theme--red {
2444
fill: $RED;
45+
46+
&--stroke {
47+
stroke:$RED;
48+
}
2549
}
2650

2751
.theme--green {
2852
fill: $GREEN;
53+
54+
&--stroke {
55+
stroke:$GREEN;
56+
}
2957
}
3058

3159
.theme--grey {
3260
fill: $GREY;
61+
62+
&--stroke {
63+
stroke:$GREY;
64+
}
3365
}
3466

3567
.theme--grey-light {
3668
fill:lighten($GREY, 20);
69+
70+
&--stroke {
71+
stroke:lighten($GREY, 20);
72+
}
3773
}
3874

3975
.theme--red-light {
4076
fill:$LIGHT_RED;
77+
78+
&--stroke {
79+
stroke:$LIGHT_RED;
80+
}
4181
}
4282

4383
.theme--orange {
44-
fill:$ORANGE
84+
fill:$ORANGE;
85+
86+
&--stroke {
87+
stroke:$ORANGE;
88+
}
4589
}
4690

4791
.theme--yellow {
48-
fill:$YELLOW
92+
fill:$YELLOW;
93+
94+
&--stroke {
95+
stroke:$YELLOW;
96+
}
4997
}
5098

5199
.theme--white {
52100
fill:white;
101+
102+
&--stroke {
103+
stroke:white;
104+
}
53105
}

components/Symbols/Icon.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
paper: () => import('./library/PaperSymbol.vue'),
4242
bookmark: () => import('./library/BookmarkSymbol.vue'),
4343
mail: () => import('./library/MailSymbol.vue'),
44+
clock: () => import('./library/ClockSymbol.vue'),
4445
book: () => import('./library/BookSymbol.vue')
4546
}
4647
})

components/Symbols/Symbol.vue

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
<script lang="ts">
2-
import {Component, Vue, Prop} from 'vue-property-decorator'
2+
import {Component, Vue, Prop} from 'vue-property-decorator'
33
4-
@Component({
5-
name: 'SymbolLogo'
6-
})
7-
export default class Symbol extends Vue {
8-
@Prop({type: String, default: "theme--default"}) readonly theme?: string;
4+
@Component({
5+
name: 'SymbolLogo'
6+
})
7+
export default class Symbol extends Vue {
8+
@Prop({type: String, default: "theme--default"}) readonly theme?: string;
9+
10+
get themeStroke() {
11+
return this.theme + '--stroke';
912
}
13+
}
1014
</script>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<template>
2+
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path :class="themeStroke" d='M256,64C150,64,64,150,64,256s86,192,192,192,192-86,192-192S362,64,256,64Z' style='fill:none;stroke-miterlimit:10;stroke-width:32px'/><polyline :class="themeStroke" points='256 128 256 272 352 272' style='fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px'/></svg>
3+
</template>
4+
5+
<script lang="ts">
6+
import Symbol from "../Symbol.vue";
7+
import {Component, Mixins} from 'vue-property-decorator'
8+
9+
@Component
10+
export default class ClockSymbol extends Mixins(Symbol) {}
11+
</script>

0 commit comments

Comments
 (0)