Skip to content

Commit

Permalink
cleanup returns
Browse files Browse the repository at this point in the history
  • Loading branch information
connerblanton committed Nov 19, 2023
1 parent d492ff7 commit 7809ba5
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/runtime/composables/useButtonGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,10 @@ export function useInjectButtonGroup ({ ui, props }: { ui: any, props: any }) {
size: computed(() => groupContext?.value.size || props.size),
rounded: computed(() => {
if (!groupContext) return ui.value.rounded
if (groupContext.value.children.length === 1) {
return groupContext.value.ui.rounded
} else if (positionInGroup.value === 0 || positionInGroup.value === -1) {
return groupContext.value.rounded.start
} else if (positionInGroup.value === groupContext.value.children.length - 1) {
return groupContext.value.rounded.end
} else {
return 'rounded-none'
}
if (groupContext.value.children.length === 1) return groupContext.value.ui.rounded
if (positionInGroup.value === 0 || positionInGroup.value === -1) return groupContext.value.rounded.start
if (positionInGroup.value === groupContext.value.children.length - 1) return groupContext.value.rounded.end
return 'rounded-none'
})
}
}

0 comments on commit 7809ba5

Please sign in to comment.