UNPKG

@bitrix24/b24ui-nuxt

Version:

Bitrix24 UI-Kit for developing web applications REST API for NUXT & VUE

11 lines (10 loc) 483 B
import { inject, computed } from "vue"; export const buttonGroupInjectionKey = Symbol("bitrix24-ui.button-group"); export function useButtonGroup(props) { const buttonGroup = inject(buttonGroupInjectionKey, void 0); return { orientation: computed(() => buttonGroup?.value.orientation), size: computed(() => props?.size ?? buttonGroup?.value.size), noSplit: computed(() => buttonGroup?.value.orientation !== "horizontal" || buttonGroup?.value.noSplit === true) }; }