1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00

Part of #18714: Replacing deprecated constants in Modal-Header folder (#19339)

* replacing deprecated

* replacing deprecated

---------

Co-authored-by: Brad Decker <bhdecker84@gmail.com>
This commit is contained in:
rohit kerkar 2023-05-31 22:42:21 +05:30 committed by GitHub
parent d09c8bd492
commit 80de5ceed4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,11 +1,11 @@
import React from 'react';
import { ComponentStory, ComponentMeta } from '@storybook/react';
import { StoryFn, Meta } from '@storybook/react';
import {
TextVariant,
TextAlign,
DISPLAY,
FLEX_DIRECTION,
Display,
FlexDirection,
AlignItems,
JustifyContent,
} from '../../../helpers/constants/design-system';
@ -32,16 +32,16 @@ export default {
args: {
children: 'ModalHeader',
},
} as ComponentMeta<typeof ModalHeader>;
} as Meta<typeof ModalHeader>;
const Template: ComponentStory<typeof ModalHeader> = (args) => {
const Template: StoryFn<typeof ModalHeader> = (args) => {
return <ModalHeader {...args} />;
};
export const DefaultStory = Template.bind({});
DefaultStory.storyName = 'Default';
export const Children: ComponentStory<typeof ModalHeader> = (args) => (
export const Children: StoryFn<typeof ModalHeader> = (args) => (
<>
<ModalHeader {...args} marginBottom={4}>
Children as string
@ -49,8 +49,8 @@ export const Children: ComponentStory<typeof ModalHeader> = (args) => (
<ModalHeader
{...args}
childrenWrapperProps={{
display: DISPLAY.FLEX,
flexDirection: FLEX_DIRECTION.COLUMN,
display: Display.Flex,
flexDirection: FlexDirection.Column,
alignItems: AlignItems.center,
justifyContent: JustifyContent.center,
}}