1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/ui/components/ui/numeric-input/numeric-input.stories.js
George Marshall 854fc71ae7
Organizing storybook to echo app folder structure (#12796)
* Organizing storybook to echo app folder structure

* Updating new stories to follow new convention from develop
2021-12-01 11:27:57 -08:00

40 lines
785 B
JavaScript

import React from 'react';
import NumericInput from '.';
export default {
title: 'Components/UI/NumericInput',
id: __filename,
};
const onChange = (e) => console.log('changed value: ', e.target.value);
export const DefaultStory = () => {
return (
<div style={{ width: '600px' }}>
<NumericInput onChange={onChange} />
</div>
);
};
DefaultStory.storyName = 'Default';
export const WithDetail = () => {
return (
<div style={{ width: '600px' }}>
<NumericInput detailText="= $0.06" onChange={onChange} />
</div>
);
};
export const WithError = () => {
return (
<div style={{ width: '600px' }}>
<NumericInput
detailText="= $0.06"
error="This number isn't great"
onChange={onChange}
/>
</div>
);
};