Differential D9782 Diff 29207 web/cashtab-components/src/components/CashtabBadge/CashtabBadge.stories.tsx
Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab-components/src/components/CashtabBadge/CashtabBadge.stories.tsx
Show All 14 Lines | |||||
const Template: Story<CashtabBadgeProps> = (args: CashtabBadgeProps) => ( | const Template: Story<CashtabBadgeProps> = (args: CashtabBadgeProps) => ( | ||||
<CashtabBadge {...args} /> | <CashtabBadge {...args} /> | ||||
); | ); | ||||
export const Standard = Template.bind({}); | export const Standard = Template.bind({}); | ||||
Standard.args = { | Standard.args = { | ||||
price: 0.05, | price: 0.05, | ||||
currency: 'USD', | currency: 'USD', | ||||
to: 'bitcoincash:qrcl220pxeec78vnchwyh6fsdyf60uv9tcynw3u2ev', | to: 'ecash:qrcl220pxeec78vnchwyh6fsdyf60uv9tca7668slm', | ||||
}; | }; | ||||
export const MostProps = Template.bind({}); | export const MostProps = Template.bind({}); | ||||
MostProps.args = { | MostProps.args = { | ||||
price: 0.0025, | price: 0.0025, | ||||
currency: 'GBP', | currency: 'GBP', | ||||
to: 'bitcoincash:qrcl220pxeec78vnchwyh6fsdyf60uv9tcynw3u2ev', | to: 'ecash:qrcl220pxeec78vnchwyh6fsdyf60uv9tca7668slm', | ||||
isRepeatable: true, | isRepeatable: true, | ||||
repeatTimeout: 4000, | repeatTimeout: 4000, | ||||
text: 'My Cash Button', | text: 'My Cash Button', | ||||
showAmount: true, | showAmount: true, | ||||
showBorder: true, | showBorder: true, | ||||
showQR: false, | showQR: false, | ||||
}; | }; | ||||
export const Minimal = Template.bind({}); | export const Minimal = Template.bind({}); | ||||
Minimal.args = { | Minimal.args = { | ||||
amount: 0.01, | amount: 0.01, | ||||
to: 'bitcoincash:qrcl220pxeec78vnchwyh6fsdyf60uv9tcynw3u2ev', | to: 'ecash:qrcl220pxeec78vnchwyh6fsdyf60uv9tca7668slm', | ||||
showAmount: false, | showAmount: false, | ||||
showQR: true, | showQR: true, | ||||
}; | }; | ||||
export const Fiat = Template.bind({}); | export const Fiat = Template.bind({}); | ||||
Fiat.args = { | Fiat.args = { | ||||
price: 3.5, | price: 3.5, | ||||
currency: 'CAD', | currency: 'CAD', | ||||
text: 'Pay with Cashtab', | text: 'Pay with Cashtab', | ||||
to: 'bitcoincash:qrcl220pxeec78vnchwyh6fsdyf60uv9tcynw3u2ev', | to: 'ecash:qrcl220pxeec78vnchwyh6fsdyf60uv9tca7668slm', | ||||
}; | }; | ||||
Fiat.storyName = 'price in fiat'; | Fiat.storyName = 'price in fiat'; | ||||
export const BCHA = Template.bind({}); | export const BCHA = Template.bind({}); | ||||
BCHA.args = { | BCHA.args = { | ||||
coinType: Ticker.coinSymbol, | coinType: Ticker.coinSymbol, | ||||
amount: 0.33, | amount: 0.33, | ||||
to: 'bitcoincash:qrcl220pxeec78vnchwyh6fsdyf60uv9tcynw3u2ev', | to: 'ecash:qrcl220pxeec78vnchwyh6fsdyf60uv9tca7668slm', | ||||
}; | }; | ||||
BCHA.storyName = `price in ${Ticker.coinSymbol}`; | BCHA.storyName = `price in ${Ticker.coinSymbol}`; | ||||
export const SLPA = Template.bind({}); | export const SLPA = Template.bind({}); | ||||
SLPA.args = { | SLPA.args = { | ||||
coinType: Ticker.tokenTicker, | coinType: Ticker.tokenTicker, | ||||
tokenId: tokenIdOptions[0], | tokenId: tokenIdOptions[0], | ||||
amount: 100, | amount: 100, | ||||
to: 'simpleledger:qqvcsnz9x9nu7vq35vmrkjc7hkfxhhs9nuqw7ew08n', | to: 'etoken:qrcl220pxeec78vnchwyh6fsdyf60uv9tcnqnc3hmv', | ||||
showQR: true, | showQR: true, | ||||
}; | }; | ||||
SLPA.storyName = `price in ${Ticker.tokenTicker}`; | SLPA.storyName = `price in ${Ticker.tokenTicker}`; | ||||
export const StepControlled = Template.bind({}); | export const StepControlled = Template.bind({}); | ||||
StepControlled.args = { | StepControlled.args = { | ||||
amount: 0.012, | amount: 0.012, | ||||
to: 'bitcoincash:qrcl220pxeec78vnchwyh6fsdyf60uv9tcynw3u2ev', | to: 'ecash:qrcl220pxeec78vnchwyh6fsdyf60uv9tca7668slm', | ||||
stepControlled: 'fresh', | stepControlled: 'fresh', | ||||
}; | }; | ||||
StepControlled.storyName = `Controlled Step`; | StepControlled.storyName = `Controlled Step`; | ||||
export default { | export default { | ||||
title: 'CashtabBadge', | title: 'CashtabBadge', | ||||
component: CashtabBadge, | component: CashtabBadge, | ||||
Show All 21 Lines |