Skip to content

Commit

Permalink
fix(ButtonGroup): switch back to ui prop
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac committed Sep 7, 2023
1 parent 0a7c50b commit d4e3ab6
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/runtime/components/elements/ButtonGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,18 @@ export default defineComponent({
vProps.size = props.size
}

const classes = ['shadow-none', 'rounded-none']
vProps.ui = node.props?.ui || {}
vProps.ui.rounded = 'rounded-none'
vProps.ui.base = '!shadow-none'

if (index === 0) {
classes.push(rounded.value.left)
vProps.ui.rounded += ` ${rounded.value.left}`
}

if (index === children.value.length - 1) {
classes.push(rounded.value.right)
vProps.ui.rounded += ` ${rounded.value.right}`
}

vProps.class = node.props?.class || ''
vProps.class = twMerge(twJoin(...classes), vProps.class)

return cloneVNode(node, vProps)
}))

Expand Down

0 comments on commit d4e3ab6

Please sign in to comment.