import { wordpress } from '@wordpress/icons';
import { SVG, Path } from '@wordpress/primitives';
import { Icon } from '.';
import type { Meta, StoryFn } from '@storybook/react';
const meta: Meta< typeof Icon > = {
title: 'Unpublished/Icon',
component: Icon,
parameters: {
docs: { canvas: { sourceState: 'shown' } },
},
};
export default meta;
const Template: StoryFn< typeof Icon > = ( args ) =>
),
};
WithAFunction.parameters = {
docs: {
source: {
code: `
) }
/>
`,
},
},
};
const MyIconComponent = ( { size }: { size?: number } ) => (
);
/**
* When `icon` is a component, it will be passed the `size` prop and any other additional props.
*/
export const WithAComponent = Template.bind( {} );
WithAComponent.args = {
...Default.args,
icon: