@varlet/ui
Version:
A Vue3 component library based on Material Design 2 and 3, supporting mobile and desktop.
14 lines (13 loc) • 348 B
JavaScript
import { useParent } from "@varlet/use";
import { RADIO_GROUP_BIND_RADIO_KEY } from "../radio-group/provide.mjs";
function useRadioGroup() {
const { bindParent, parentProvider, index } = useParent(RADIO_GROUP_BIND_RADIO_KEY);
return {
index,
radioGroup: parentProvider,
bindRadioGroup: bindParent
};
}
export {
useRadioGroup
};