1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00
metamask-extension/ui/pages/keyring-snaps/add-snap-account-modal/add-snap-account-modal.stories.tsx
Garrett Bear 66292330fe
Feat/18890/button ts update (#20492)
* button to TS migration

working demo

style props

broken mapping - need switch

working types file

working types

fix dependent imports of Button

variant mapping

working types

fix lint

fix test

fix ButtonSize issue on QuizContent

box fix

test if this works

fix button being used on QuizContent

fix button_variant import

readme fix

* fix button import

* fix primary button as anchor hover

* deprecated

* button to TS migration

fix lint

fix test

* fix rebase issue

* fix rebase issue

* lint fix
2023-08-28 14:42:00 -07:00

37 lines
946 B
TypeScript

import { useArgs } from '@storybook/client-api';
import { StoryFn } from '@storybook/react';
import React from 'react';
import { ButtonVariant, Button } from '../../../components/component-library';
import AddSnapAccountModal from '.';
const AddSnapAccountModalStory = {
title: 'Components/App/AddSnapAccountModal',
component: AddSnapAccountModal,
argTypes: {},
};
export const DefaultStory: StoryFn<typeof AddSnapAccountModal> = () => {
const [{ isShowingModal }, updateArgs] = useArgs();
return (
<>
<Button
variant={ButtonVariant.Primary}
onClick={() => updateArgs({ isShowingModal: true })}
>
Open modal
</Button>
{isShowingModal && (
<AddSnapAccountModal
isOpen={isShowingModal}
onClose={() => updateArgs({ isShowingModal: false })}
/>
)}
</>
);
};
DefaultStory.storyName = 'Default';
export default AddSnapAccountModalStory;