File tree 3 files changed +24
-2
lines changed
3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -253,6 +253,7 @@ const date = ref()
253
253
<USlider v-model =" isSliderOpen" />
254
254
</div >
255
255
<UTable v-model =" tableCheck" class =" w-full" :columns =" columns" :rows =" people" :sort =" { column: 'name' }" />
256
+ <UTag size =" xs" label =" I'm a tag" />
256
257
<UTag label =" I'm a tag" />
257
258
<div class =" flex gap-2.5" >
258
259
<UTooltip text =" Hi bro !" :popper =" { placement: 'left' }" >
Original file line number Diff line number Diff line change @@ -18,10 +18,11 @@ const props = withDefaults(defineProps<{
18
18
ui : () => useAppUi ().tag ,
19
19
})
20
20
21
- const config = computed (() => merge ({}, useAppUi (). tag , props . ui ) )
21
+ const { primaryColor } = useAppTheme ( )
22
22
23
+ const config = computed (() => merge ({}, useAppUi ().tag , props .ui ))
23
24
const tagClass = computed (() => {
24
- const variant = config .value .variant [props .variant ]
25
+ const variant = config .value .color ?.[ props . color ]?.[ props . variant ] || ( props . color === ' primary ' && config . value . color ?.[ primaryColor . value ]?.[ props . variant ]) || config . value . variant [props .variant ]
25
26
return classNames (
26
27
config .value .base ,
27
28
config .value .font ,
Original file line number Diff line number Diff line change @@ -12,6 +12,26 @@ export const tag = {
12
12
md : 'text-13px px-3 py-1.25' ,
13
13
lg : 'text-13px px-4 py-1.75' ,
14
14
} ,
15
+ color : {
16
+ fluo : {
17
+ solid : 'bg-{color}-50 dark:bg-{color}-950 text-{color}-600 dark:text-{color}-300' ,
18
+ } ,
19
+ cyan : {
20
+ solid : 'bg-{color}-50 dark:bg-{color}-950 text-{color}-600 dark:text-{color}-300' ,
21
+ } ,
22
+ yellow : {
23
+ solid : 'bg-{color}-50 dark:bg-{color}-950 text-{color}-600 dark:text-{color}-300' ,
24
+ } ,
25
+ silver : {
26
+ solid : 'bg-{color}-50 dark:bg-{color}-950 text-{color}-600 dark:text-{color}-300' ,
27
+ } ,
28
+ dark : {
29
+ solid : 'bg-{color}-50 dark:bg-{color}-600 text-dark-500 dark:text-light-500' ,
30
+ } ,
31
+ light : {
32
+ solid : 'bg-{color}-200 dark:bg-{color}-600 text-{color}-800 dark:text-{color}-200' ,
33
+ } ,
34
+ } ,
15
35
variant : {
16
36
solid : 'bg-{color}-50 dark:bg-{color}-950 text-{color}-500 dark:text-{color}-400' ,
17
37
} ,
You can’t perform that action at this time.
0 commit comments