2021-12-14 19:14:53 +00:00
|
|
|
import { Meta } from '@storybook/react';
|
|
|
|
|
2022-11-13 08:10:18 +00:00
|
|
|
import { Edition, FeatureId } from '@/react/portainer/feature-flags/enums';
|
|
|
|
import { init as initFeatureService } from '@/react/portainer/feature-flags/feature-flags.service';
|
2021-12-14 19:14:53 +00:00
|
|
|
|
|
|
|
import { BEFeatureIndicator, Props } from './BEFeatureIndicator';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
component: BEFeatureIndicator,
|
|
|
|
title: 'Components/BEFeatureIndicator',
|
|
|
|
argTypes: {
|
|
|
|
featureId: {
|
|
|
|
control: { type: 'select', options: Object.values(FeatureId) },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
} as Meta<Props>;
|
|
|
|
|
|
|
|
// : JSX.IntrinsicAttributes & PropsWithChildren<Props>
|
|
|
|
function Template({ featureId }: Props) {
|
|
|
|
initFeatureService(Edition.CE);
|
|
|
|
|
|
|
|
return <BEFeatureIndicator featureId={featureId} />;
|
|
|
|
}
|
|
|
|
|
|
|
|
export const Example = Template.bind({});
|