2021-02-04 19:15:23 +01:00
|
|
|
import React from 'react';
|
|
|
|
import ExchangeRateDisplay from './exchange-rate-display';
|
2020-08-18 15:53:54 +02:00
|
|
|
|
|
|
|
export default {
|
2021-12-01 20:27:57 +01:00
|
|
|
title: 'Pages/Swaps/ExchangeRateDisplay',
|
2023-01-20 20:27:46 +01:00
|
|
|
|
2022-12-15 23:46:30 +01:00
|
|
|
argTypes: {
|
|
|
|
primaryTokenValue: {
|
|
|
|
control: {
|
|
|
|
type: 'text',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
primaryTokenDecimals: {
|
|
|
|
control: {
|
|
|
|
type: 'number',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
primaryTokenSymbol: {
|
|
|
|
control: {
|
|
|
|
type: 'text',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
secondaryTokenValue: {
|
|
|
|
control: {
|
|
|
|
type: 'text',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
secondaryTokenDecimals: {
|
|
|
|
control: 'number',
|
|
|
|
},
|
|
|
|
secondaryTokenSymbol: {
|
|
|
|
control: {
|
|
|
|
type: 'text',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2020-08-18 15:53:54 +02:00
|
|
|
|
2022-02-21 15:13:11 +01:00
|
|
|
export const DefaultStory = (args) => {
|
|
|
|
return <ExchangeRateDisplay {...args} />;
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2020-08-18 15:53:54 +02:00
|
|
|
|
2021-12-01 20:27:57 +01:00
|
|
|
DefaultStory.storyName = 'Default';
|
|
|
|
|
2022-12-15 23:46:30 +01:00
|
|
|
DefaultStory.args = {
|
|
|
|
primaryTokenValue: '2000000000000000000',
|
|
|
|
primaryTokenDecimals: 18,
|
|
|
|
primaryTokenSymbol: 'ETH',
|
|
|
|
secondaryTokenValue: '200000000000000000',
|
|
|
|
secondaryTokenDecimals: 18,
|
|
|
|
secondaryTokenSymbol: 'ABC',
|
2022-02-21 15:13:11 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
export const WhiteOnBlue = (args) => {
|
2020-08-18 15:53:54 +02:00
|
|
|
return (
|
|
|
|
<div
|
|
|
|
style={{
|
|
|
|
width: '150px',
|
|
|
|
height: '30px',
|
|
|
|
borderRadius: '4px',
|
|
|
|
display: 'flex',
|
|
|
|
justifyContent: 'center',
|
|
|
|
alignItems: 'center',
|
2022-03-25 23:15:31 +01:00
|
|
|
background:
|
|
|
|
'linear-gradient(90deg, var(--color-primary-default) 0%, var(--color-primary-muted) 101.32%)',
|
2020-08-18 15:53:54 +02:00
|
|
|
}}
|
|
|
|
>
|
2022-02-21 15:13:11 +01:00
|
|
|
<ExchangeRateDisplay {...args} />
|
2020-08-18 15:53:54 +02:00
|
|
|
</div>
|
2021-02-04 19:15:23 +01:00
|
|
|
);
|
|
|
|
};
|
2022-02-21 15:13:11 +01:00
|
|
|
|
2022-12-15 23:46:30 +01:00
|
|
|
WhiteOnBlue.args = {
|
|
|
|
primaryTokenValue: '2000000000000000000',
|
|
|
|
primaryTokenDecimals: 18,
|
|
|
|
primaryTokenSymbol: 'ETH',
|
|
|
|
secondaryTokenValue: '200000000000000000',
|
|
|
|
secondaryTokenDecimals: 18,
|
|
|
|
secondaryTokenSymbol: 'ABC',
|
2022-02-21 15:13:11 +01:00
|
|
|
};
|