Skip to content

Commit

Permalink
test(FxInput): add story for different component sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
Голубев Олег Игоревич committed May 7, 2021
1 parent 32b27f1 commit c85a335
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,24 @@ import { CSFStory } from 'creevey';

import { BGRuler } from '../../../internal/BGRuler';
import { FxInput } from '../FxInput';
import { Gapped } from '../../Gapped';
import { createPropsGetter } from '../../../lib/createPropsGetter';
import { InputType } from '../../Input';
import { InputSize, InputType } from '../../Input';

export default { title: 'FxInput' };

export const TypeText = () => <TestFxInput />;
TypeText.story = { name: 'type text' };

export const DifferentSizesFxInput = () => (
<Gapped vertical>
<TestFxInput size="small" />
<TestFxInput size="medium" />
<TestFxInput size="large" />
</Gapped>
);
DifferentSizesFxInput.story = { name: 'different sizes' };

export const TypeCurrency = () => <TestFxInput type={'currency'} fractionDigits={4} />;
TypeCurrency.story = { name: 'type currency' };

Expand Down Expand Up @@ -54,6 +64,7 @@ interface TestFxInputProps {
autoFocus?: boolean;
borderless?: boolean;
fractionDigits?: number;
size?: InputSize;
}

interface TestFxInputState {
Expand Down Expand Up @@ -86,6 +97,7 @@ class TestFxInput extends React.Component<TestFxInputProps, TestFxInputState> {
value={this.state.value}
onRestore={this.handleRestore}
onValueChange={this.handleChange}
size={this.props.size}
/>
);
}
Expand Down

0 comments on commit c85a335

Please sign in to comment.