diff --git a/src/routes/safe/component/Layout.stories.js b/src/routes/safe/component/Layout.stories.js index 83cfecea..30ecd637 100644 --- a/src/routes/safe/component/Layout.stories.js +++ b/src/routes/safe/component/Layout.stories.js @@ -30,8 +30,20 @@ storiesOf('Routes /safe:address', module) fetchBalance={() => {}} /> )) - .add('Safe with 2 owners', () => { - const safe = SafeFactory.twoOwnersSafe + .add('Safe with 2 owners and 10ETH as dailyLimit', () => { + const safe = SafeFactory.dailyLimitSafe(10, 1.345) + + return ( + {}} + /> + ) + }) + .add('Safe with dailyLimit reached', () => { + const safe = SafeFactory.dailyLimitSafe(10, 10) return ( void, } export const WITHDRAWN_BUTTON_TEXT = 'Withdrawn' -const DailyLimit = ({ dailyLimit, onWithdrawn }: Props) => { +const DailyLimitComponent = ({ dailyLimit, onWithdrawn }: Props) => { const limit = dailyLimit.get('value') - const disabled = dailyLimit.get('todaySpent') > limit + const spentToday = dailyLimit.get('spentToday') + const disabled = spentToday >= limit + const text = `${limit} ETH (spent today: ${spentToday} ETH)` return ( - +