blob: a2817d63d379bf3c590fb93fcc8cffda3a175e00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
<template>
<div>
<div class="color-tile-container">
<div v-for="item in baseColors">
<div
:style="{ backgroundColor: item.hex }"
:class="{ 'color-tile--border': item.border }"
class="color-tile"
></div>
<dl class="color-tile-desc">
<dt>Variable:</dt>
<dd>${{ item.name }}</dd>
</dl>
<dl class="color-tile-desc">
<dt>Color Variable:</dt>
<dd>{{ item.variable }}</dd>
</dl>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
baseColors: [
{
name: 'blue',
variable: '$blue-500',
hex: '#2d60e5'
},
{
name: 'green',
variable: '$green-500',
hex: '#0a7d06'
},
{
name: 'red',
variable: '$red-500',
hex: '#da1416'
},
{
name: 'yellow',
variable: '$yellow-500',
hex: '#efc100'
}
]
};
}
};
</script>
<style lang="scss">
@import "./colors.scss";
</style>
|