From 7809ba56a20784c098ad86ccf8f88dd0b8f66723 Mon Sep 17 00:00:00 2001 From: Conner Blanton Date: Sun, 19 Nov 2023 15:19:31 -0600 Subject: [PATCH] cleanup returns --- src/runtime/composables/useButtonGroup.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/runtime/composables/useButtonGroup.ts b/src/runtime/composables/useButtonGroup.ts index cba9e66420..5887b70e9b 100644 --- a/src/runtime/composables/useButtonGroup.ts +++ b/src/runtime/composables/useButtonGroup.ts @@ -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' }) } }