fine-true
Version:
A small and beautiful Vue3 version of the UI Library
14 lines (10 loc) • 371 B
text/typescript
import { InjectionKey, ComputedRef, Ref } from 'vue';
export type CollapseValueType = string | string[];
export type CollapseProvideType = {
accordion: ComputedRef<boolean>;
modelValue: Ref<CollapseValueType>;
toggle: (value: string) => void;
};
export const COLLAPSEPROVEKEY: InjectionKey<CollapseProvideType> = Symbol(
'collapse-provide-key'
);