Skip to content

Commit aec1fcb

Browse files
committed
fix(native-select): add bg and text color to optgroup
1 parent 80780f6 commit aec1fcb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

apps/v4/public/r/styles/new-york-v4/native-select.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
{
1616
"path": "registry/new-york-v4/ui/native-select/NativeSelectOptGroup.vue",
17-
"content": "<!-- @fallthroughAttributes true -->\n<!-- @strictTemplates true -->\n\n<script setup lang=\"ts\">\n</script>\n\n<template>\n <optgroup data-slot=\"native-select-optgroup\">\n <slot />\n </optgroup>\n</template>\n",
17+
"content": "<!-- @fallthroughAttributes true -->\n<!-- @strictTemplates true -->\n\n<script setup lang=\"ts\">\nimport type { HTMLAttributes } from \"vue\"\nimport { cn } from \"@/lib/utils\"\n\nconst props = defineProps<{ class?: HTMLAttributes[\"class\"] }>()\n</script>\n\n<template>\n <optgroup data-slot=\"native-select-optgroup\" :class=\"cn('bg-popover text-popover-foreground', props.class)\">\n <slot />\n </optgroup>\n</template>\n",
1818
"type": "registry:ui"
1919
},
2020
{

apps/v4/registry/new-york-v4/ui/native-select/NativeSelectOptGroup.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22
<!-- @strictTemplates true -->
33

44
<script setup lang="ts">
5+
import type { HTMLAttributes } from "vue"
6+
import { cn } from "@/lib/utils"
7+
8+
const props = defineProps<{ class?: HTMLAttributes["class"] }>()
59
</script>
610

711
<template>
8-
<optgroup data-slot="native-select-optgroup">
12+
<optgroup data-slot="native-select-optgroup" :class="cn('bg-popover text-popover-foreground', props.class)">
913
<slot />
1014
</optgroup>
1115
</template>

0 commit comments

Comments
 (0)