Skip to content

Commit 8ae1224

Browse files
fix: ToolbarSeparator
1 parent 82f29ac commit 8ae1224

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/vue-primitives/src/toolbar/ToolbarSeparator.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ defineOptions({
77
name: 'ToolbarSeparator',
88
})
99
10-
defineProps<ToolbarSeparatorProps>()
10+
const props = defineProps<ToolbarSeparatorProps>()
1111
1212
const context = useToolbarContext('ToolbarSeparator')
1313
@@ -16,10 +16,11 @@ const decorativeAttrs = { role: 'none' }
1616
const orientation = () => context.orientation() === 'horizontal' ? 'vertical' : 'horizontal'
1717
1818
function attrs() {
19-
const orientation = context.orientation()
20-
if (orientation)
19+
if (props.decorative)
2120
return decorativeAttrs
2221
22+
const orientation = context.orientation()
23+
2324
return {
2425
'aria-orientation': orientation === 'vertical' ? orientation : undefined,
2526
'role': 'separator',

0 commit comments

Comments
 (0)