diff --git a/ui/components/ui/list-item/list-item.stories.js b/ui/components/ui/list-item/list-item.stories.js index e56586b0e..bcd5e2f1b 100644 --- a/ui/components/ui/list-item/list-item.stories.js +++ b/ui/components/ui/list-item/list-item.stories.js @@ -1,6 +1,5 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { text } from '@storybook/addon-knobs'; import Send from '../icon/send-icon.component'; import Interaction from '../icon/interaction-icon.component'; import Approve from '../icon/approve-icon.component'; @@ -12,6 +11,29 @@ import ListItem from './list-item.component'; export default { title: 'Components/UI/ListItem', id: __filename, + argTypes: { + title: { + control: 'text', + }, + subtitle: { + control: 'text', + }, + primaryCurrency: { + control: 'text', + }, + secondaryCurrency: { + control: 'text', + }, + className: { + control: 'text', + }, + }, + args: { + title: 'Send DAI', + subtitle: 'Sept 20 · To: 00X4...3058', + primaryCurrency: '2 ETH', + secondaryCurrency: '70 USD', + }, }; function Currencies({ primary, secondary }) { @@ -31,34 +53,46 @@ Currencies.propTypes = { const okColor = 'var(--color-primary-default)'; const failColor = 'var(--color-error-default'; -export const SendComponent = () => ( +export const SendComponent = (args) => ( } titleIcon={} - title={text('title', 'Send DAI')} - className="list-item" - subtitle={text('subtitle', 'Sept 20 · To: 00X4...3058')} + title={args.title} + subtitle={args.subtitle} + className={args.className} rightContent={ } >
- +
); -export const PendingComponent = () => ( +SendComponent.argTypes = { + secondaryButtonText: { + control: 'text', + defaultValue: 'Speed Up', + }, + cancelButtonText: { + control: 'text', + defaultValue: 'Cancel', + }, +}; + +export const PendingComponent = (args) => ( } - title={text('title', 'Hatch Turtles')} - className="list-item" + className={args.className} subtitleStatus={ @@ -67,41 +101,39 @@ export const PendingComponent = () => ( ·{' '} } - subtitle={text('subtitle', 'Turtlefarm.com')} rightContent={ } /> ); -export const ApproveComponent = () => ( +export const ApproveComponent = (args) => ( } - title={text('title', 'Approve spend limit')} - className="list-item" - subtitle={text('subtitle', 'Sept 20 · oxuniverse.com')} + className={args.className} rightContent={ } /> ); -export const ReceiveComponent = () => ( +export const ReceiveComponent = (args) => ( } - title={text('title', 'Hatch Turtles')} - className="list-item" - subtitle={text('subtitle', 'Sept 20 · From: 00X4...3058')} + className={args.className} rightContent={ } />