File tree Expand file tree Collapse file tree 1 file changed +28
-5
lines changed
src/components/Canvas/Sections Expand file tree Collapse file tree 1 file changed +28
-5
lines changed Original file line number Diff line number Diff line change 2121 class =" mb-4"
2222 >
2323 <div
24- class =" mr-4 mb-2 flex-none w-40 h-40"
25- :style =" {
26- backgroundColor: value
27- }"
28- />
24+ class =" mr-4 mb-2 flex-none w-40 h-40 flex items-center justify-center"
25+ :class =" {'border border-gray-300': selectedProp === 'text'}"
26+ :style =" tileStyle(value)"
27+ >
28+ <span
29+ class =" text-3xl"
30+ :style =" {
31+ color: value
32+ }"
33+ v-if =" selectedProp === 'text'" >Aa</span >
34+ </div >
2935 <CanvasBlockLabel
3036 :label =" `${selectedProp}-${prop}`"
3137 :value =" value"
@@ -42,6 +48,7 @@ export default {
4248 components: {
4349 CanvasBlockLabel
4450 },
51+
4552 props: {
4653 data: {
4754 type: Object ,
@@ -53,6 +60,22 @@ export default {
5360 return {
5461 selectedProp: ' bg'
5562 }
63+ },
64+
65+ methods: {
66+ tileStyle (value ) {
67+ if (this .selectedProp === ' bg' ) {
68+ return {
69+ backgroundColor: value
70+ }
71+ }
72+
73+ if (this .selectedProp === ' border' ) {
74+ return {
75+ border: ` 2px solid ${ value} `
76+ }
77+ }
78+ }
5679 }
5780
5881}
You can’t perform that action at this time.
0 commit comments