@shopware-ag/meteor-component-library
Version:
The meteor component library is a Vue component library developed by Shopware. It is based on the [Meteor Design System](https://shopware.design/).
19 lines (13 loc) • 499 B
text/typescript
import { inject, provide } from "vue";
const defaultFutureFlags = {
removeCardWidth: false,
removeDefaultMargin: false,
};
export type FutureFlags = typeof defaultFutureFlags;
export const futureFlagsInjectionKey = Symbol("mt-future-flags");
export function provideFutureFlags(flags: FutureFlags | undefined) {
provide(futureFlagsInjectionKey, flags ?? defaultFutureFlags);
}
export function useFutureFlags(): FutureFlags {
return inject(futureFlagsInjectionKey, defaultFutureFlags);
}