Skip to content

Commit

Permalink
fix: change default html element of MenuLabel, SelectLabel, ComboboxL…
Browse files Browse the repository at this point in the history
…abel from `label` to `div` (#486)

* fix: change default html element of `MenuLabel` from `label` to `div`

* docs: align label prop with component implementations

* fix: change default html element of `SelectLabel` from `label` to `div`

* fix: change default html element of `ComboboxLabel` from `label` to `div`
  • Loading branch information
madebyfabian committed Nov 2, 2023
1 parent cbe4ea6 commit 4ef662e
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/content/components/combobox.md
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ Used to render the label of a group. It won't be focusable using arrow keys.
{
name: 'as',
type: 'string | Component',
default: 'label',
default: 'div',
description: 'The element or component this component should render as. Can be overwrite by <Code>asChild</Code>'
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/content/components/context-menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ Used to render a label. It won't be focusable using arrow keys.
{
name: 'as',
type: 'string | Component',
default: 'label',
default: 'div',
description: 'The element or component this component should render as. Can be overwrite by <Code>asChild</Code>'
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/content/components/dropdown-menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ Used to render a label. It won't be focusable using arrow keys.
{
name: 'as',
type: 'string | Component',
default: 'label',
default: 'div',
description: 'The element or component this component should render as. Can be overwrite by <Code>asChild</Code>'
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/content/components/menubar.md
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ Used to render a label. It won't be focusable using arrow keys.
{
name: 'as',
type: 'string | Component',
default: 'label',
default: 'div',
description: 'The element or component this component should render as. Can be overwrite by <Code>asChild</Code>'
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/content/components/select.md
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ Used to render the label of a group. It won't be focusable using arrow keys.
{
name: 'as',
type: 'string | Component',
default: 'label',
default: 'div',
description: 'The element or component this component should render as. Can be overwrite by <Code>asChild</Code>'
},
{
Expand Down
2 changes: 1 addition & 1 deletion packages/radix-vue/src/Combobox/ComboboxLabel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Primitive } from '@/Primitive'
import { injectComboboxGroupContext } from './ComboboxGroup.vue'
const props = withDefaults(defineProps<ComboboxLabelProps>(), {
as: 'label',
as: 'div',
})
const groupContext = injectComboboxGroupContext({ id: '' })
Expand Down
2 changes: 1 addition & 1 deletion packages/radix-vue/src/Menu/MenuLabel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface MenuLabelProps extends PrimitiveProps {}
import { Primitive } from '@/Primitive'
const props = withDefaults(defineProps<MenuLabelProps>(), {
as: 'label',
as: 'div',
})
</script>

Expand Down
2 changes: 1 addition & 1 deletion packages/radix-vue/src/Select/SelectLabel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Primitive } from '@/Primitive'
import { injectSelectGroupContext } from './SelectGroup.vue'
const props = withDefaults(defineProps<SelectLabelProps>(), {
as: 'label',
as: 'div',
})
const groupContext = injectSelectGroupContext({ id: '' })
Expand Down

0 comments on commit 4ef662e

Please sign in to comment.