1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 02:10:12 +01:00
metamask-extension/ui/pages/swaps/countdown-timer/countdown-timer.stories.js
Pieter Tolsma cb1890d928
Convert knobs and actions to controls/args for CountdownTimer (#14222)
Co-authored-by: Pieter Tolsma <pietertolsma@Pieters-MacBook-Air.local>
2022-03-31 13:31:31 -05:00

49 lines
924 B
JavaScript

import React from 'react';
import CountdownTimer from './countdown-timer';
import README from './README.mdx';
export default {
title: 'Pages/Swaps/CountdownTimer',
id: __filename,
component: CountdownTimer,
parameters: {
docs: {
page: README,
},
},
argTypes: {
timeStarted: {
type: 'number',
},
timeOnly: {
type: 'boolean',
},
timerBase: {
type: 'number',
},
labelKey: {
type: 'string',
},
infoTooltipLabelKey: {
type: 'string',
},
warningTime: {
type: 'string',
},
},
args: {
timeStarted: Date.now(),
timeOnly: false,
timerBase: 20000,
labelKey: 'disconnectPrompt',
infoTooltipLabelKey: 'disconnectAllAccountsConfirmationDescription',
warningTime: '0:15',
},
};
export const DefaultStory = (args) => {
return <CountdownTimer {...args} />;
};
DefaultStory.storyName = 'Default';