File tree Expand file tree Collapse file tree 37 files changed +2220
-625
lines changed Expand file tree Collapse file tree 37 files changed +2220
-625
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div >
3
3
<div class =" color-tile-container" >
4
- <div v-for =" item in baseColors" >
4
+ <div v-for =" item in baseColors" :key = " item.variable " >
5
5
<div
6
6
:style =" { backgroundColor: item.hex }"
7
7
:class =" { 'color-tile--border': item.border }"
8
8
class =" color-tile"
9
9
></div >
10
10
<dl class =" color-tile-desc" >
11
11
<dt >Variable:</dt >
12
- <dd >${{ item.name }}</dd >
12
+ <dd >{{ '$' + item.name }}</dd >
13
13
</dl >
14
14
<dl class =" color-tile-desc" >
15
15
<dt >Color Variable:</dt >
20
20
</div >
21
21
</template >
22
22
23
- <script >
24
- export default {
25
- data () {
26
- return {
27
- baseColors: [
23
+ <script setup>
24
+ import { ref } from ' vue' ;
25
+ const baseColors = ref ([
28
26
{
29
27
name: ' blue' ,
30
28
variable: ' $blue-500' ,
@@ -45,12 +43,9 @@ export default {
45
43
variable: ' $yellow-500' ,
46
44
hex: ' #efc100'
47
45
}
48
- ]
49
- };
50
- }
51
- };
46
+ ])
52
47
</script >
53
48
54
- <style lang="scss">
49
+ <style lang="scss" scoped >
55
50
@import " ./colors.scss" ;
56
51
</style >
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div >
3
3
<div class =" color-tile-container" >
4
- <div v-for =" color in colors" >
4
+ <div v-for =" color in colors" :key = " color.variable " >
5
5
<div
6
6
:style =" { backgroundColor: color.hex }"
7
7
:class =" { 'color-tile--border': color.border }"
8
8
class =" color-tile"
9
9
></div >
10
10
<dl class =" color-tile-desc" >
11
11
<dt >Color variable:</dt >
12
- <dd >${{ color.variable }}</dd >
12
+ <dd >{{ '$' + color.variable }}</dd >
13
13
</dl >
14
14
<dl class =" color-tile-desc" >
15
15
<dt >Hex:</dt >
20
20
</div >
21
21
</template >
22
22
23
- <script >
24
- export default {
25
- data () {
26
- return {
27
- colors: [
23
+ <script setup>
24
+ import { ref } from ' vue' ;
25
+ const colors = ref ([
28
26
{
29
27
variable: ' blue-500' ,
30
28
hex: ' #2d60e5'
31
29
}
32
- ]
33
- };
34
- }
35
- };
30
+ ]);
36
31
</script >
37
32
38
- <style lang="scss">
33
+ <style lang="scss" scoped >
39
34
@import " ./colors.scss" ;
40
35
</style >
File renamed without changes.
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div >
3
3
<div class =" color-tile-container" >
4
- <div v-for =" color in colors" >
4
+ <div v-for =" color in colors" :key = " color.variable " >
5
5
<div
6
6
:style =" { backgroundColor: color.hex }"
7
7
:class =" { 'color-tile--border': color.border }"
8
8
class =" color-tile"
9
9
></div >
10
10
<dl class =" color-tile-desc" >
11
11
<dt >Color variable:</dt >
12
- <dd >${{ color.variable }}</dd >
12
+ <dd >{{ '$' + color.variable }}</dd >
13
13
</dl >
14
14
<dl class =" color-tile-desc" >
15
15
<dt >Hex:</dt >
20
20
</div >
21
21
</template >
22
22
23
- <script >
24
- export default {
25
- data () {
26
- return {
27
- colors: [
23
+ <script setup>
24
+ import { ref } from ' vue' ;
25
+ const colors = ref ([
28
26
{
29
27
variable: ' gray-100' ,
30
28
hex: ' #f4f4f4' ,
@@ -62,12 +60,9 @@ export default {
62
60
variable: ' gray-900' ,
63
61
hex: ' #161616'
64
62
}
65
- ]
66
- };
67
- }
68
- };
63
+ ])
69
64
</script >
70
65
71
- <style lang="scss">
66
+ <style lang="scss" scoped >
72
67
@import " ./colors.scss" ;
73
68
</style >
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div >
3
3
<div class =" color-tile-container" >
4
- <div v-for =" color in colors" >
4
+ <div v-for =" color in colors" :key = " color.variable " >
5
5
<div
6
6
:style =" { backgroundColor: color.hex }"
7
7
:class =" { 'color-tile--border': color.border }"
8
8
class =" color-tile"
9
9
></div >
10
10
<dl class =" color-tile-desc" >
11
11
<dt >Color variable:</dt >
12
- <dd >${{ color.variable }}</dd >
12
+ <dd >{{ '$' + color.variable }}</dd >
13
13
</dl >
14
14
<dl class =" color-tile-desc" >
15
15
<dt >Hex:</dt >
20
20
</div >
21
21
</template >
22
22
23
- <script >
24
- export default {
25
- data () {
26
- return {
27
- colors: [
23
+ <script setup>
24
+ import { ref } from ' vue' ;
25
+ const colors = ref ([
28
26
{
29
27
variable: ' green-500' ,
30
28
hex: ' #0a7d06'
31
29
}
32
- ]
33
- };
34
- }
35
- };
30
+ ])
36
31
</script >
37
32
38
- <style lang="scss">
33
+ <style lang="scss" scoped >
39
34
@import " ./colors.scss" ;
40
35
</style >
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div >
3
3
<div class =" color-tile-container" >
4
- <div v-for =" color in colors" >
4
+ <div v-for =" color in colors" :key = " color.variable " >
5
5
<div
6
6
:style =" { backgroundColor: color.hex }"
7
7
:class =" { 'color-tile--border': color.border }"
8
8
class =" color-tile"
9
9
></div >
10
10
<dl class =" color-tile-desc" >
11
11
<dt >Color variable:</dt >
12
- <dd >${{ color.variable }}</dd >
12
+ <dd >{{ '$' + color.variable }}</dd >
13
13
</dl >
14
14
<dl class =" color-tile-desc" >
15
15
<dt >Hex:</dt >
20
20
</div >
21
21
</template >
22
22
23
- <script >
24
- export default {
25
- data () {
26
- return {
27
- colors: [
23
+ <script setup>
24
+ const colors = ref ([
28
25
{
29
26
variable: ' red-500' ,
30
27
hex: ' #da1416'
31
28
}
32
- ]
33
- };
34
- }
35
- };
29
+ ])
36
30
</script >
37
31
38
- <style lang="scss">
32
+ <style lang="scss" scoped >
39
33
@import " ./colors.scss" ;
40
34
</style >
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div >
3
3
<div class =" color-tile-container" >
4
- <div v-for =" item in themeColors" >
4
+ <div v-for =" item in themeColors" :key = " item.variable " >
5
5
<div
6
6
:style =" { backgroundColor: item.hex }"
7
7
:class =" { 'color-tile--border': item.border }"
8
8
class =" color-tile"
9
9
></div >
10
10
<dl class =" color-tile-desc" >
11
11
<dt >Color variable:</dt >
12
- <dd >${{ item.name }}</dd >
12
+ <dd >{{ '$' + item.name }}</dd >
13
13
</dl >
14
14
<dl class =" color-tile-desc" >
15
15
<dt >Color variable:</dt >
16
- <dd >${{ item.variable }}</dd >
16
+ <dd >{{ '$' + item.variable }}</dd >
17
17
</dl >
18
18
</div >
19
19
</div >
20
20
</div >
21
21
</template >
22
22
23
- <script >
24
- export default {
25
- data () {
26
- return {
27
- themeColors: [
23
+ <script setup>
24
+ import { ref } from ' vue' ;
25
+ const themeColors = ref ([
28
26
{
29
27
name: " primary" ,
30
28
variable: " blue" ,
@@ -66,12 +64,9 @@ export default {
66
64
variable: ' red' ,
67
65
hex: ' #da1416'
68
66
}
69
- ]
70
- };
71
- }
72
- };
67
+ ])
73
68
</script >
74
69
75
- <style lang="scss">
70
+ <style lang="scss" scoped >
76
71
@import " ./colors.scss" ;
77
72
</style >
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div >
3
3
<div class =" color-tile-container" >
4
- <div v-for =" color in colors" >
4
+ <div v-for =" color in colors" :key = " color.variable " >
5
5
<div
6
6
:style =" { backgroundColor: color.hex }"
7
7
:class =" { 'color-tile--border': color.border }"
8
8
class =" color-tile"
9
9
></div >
10
10
<dl class =" color-tile-desc" >
11
11
<dt >Color variable:</dt >
12
- <dd >${{ color.variable }}</dd >
12
+ <dd >{{ '$' + color.variable }}</dd >
13
13
</dl >
14
14
<dl class =" color-tile-desc" >
15
15
<dt >Hex:</dt >
21
21
</template >
22
22
23
23
<script >
24
- export default {
25
- data () {
26
- return {
27
- colors: [
24
+ const colors = ref ([
28
25
{
29
26
variable: ' yellow-500' ,
30
27
hex: ' #efc100'
31
28
}
32
- ]
33
- };
34
- }
35
- };
29
+ ])
36
30
</script >
37
31
38
- << style lang="scss">
32
+ <style lang="scss" scoped >
39
33
@import " ./colors.scss" ;
40
34
</style >
You can’t perform that action at this time.
0 commit comments