Style disabled <GroupTitleInput>
This commit is contained in:
parent
b725ed2ffb
commit
358838a6bc
2 changed files with 27 additions and 3 deletions
|
@ -13,12 +13,24 @@
|
|||
background: $color-white;
|
||||
color: $color-black;
|
||||
border-color: $color-gray-15;
|
||||
|
||||
&:disabled {
|
||||
background: $color-gray-02;
|
||||
border-color: $color-gray-05;
|
||||
color: $color-gray-90;
|
||||
}
|
||||
}
|
||||
|
||||
@include dark-theme {
|
||||
background: $color-gray-80;
|
||||
color: $color-gray-05;
|
||||
border-color: $color-gray-45;
|
||||
|
||||
&:disabled {
|
||||
background: $color-gray-95;
|
||||
border-color: $color-gray-60;
|
||||
color: $color-gray-20;
|
||||
}
|
||||
}
|
||||
|
||||
&:focus {
|
||||
|
|
|
@ -14,8 +14,14 @@ const i18n = setupI18n('en', enMessages);
|
|||
|
||||
const story = storiesOf('Components/GroupTitleInput', module);
|
||||
|
||||
const Wrapper = ({ disabled }: { disabled?: boolean }) => {
|
||||
const [value, setValue] = useState('');
|
||||
const Wrapper = ({
|
||||
disabled,
|
||||
startingValue = '',
|
||||
}: {
|
||||
disabled?: boolean;
|
||||
startingValue?: string;
|
||||
}) => {
|
||||
const [value, setValue] = useState(startingValue);
|
||||
|
||||
return (
|
||||
<GroupTitleInput
|
||||
|
@ -29,4 +35,10 @@ const Wrapper = ({ disabled }: { disabled?: boolean }) => {
|
|||
|
||||
story.add('Default', () => <Wrapper />);
|
||||
|
||||
story.add('Disabled', () => <Wrapper disabled />);
|
||||
story.add('Disabled', () => (
|
||||
<>
|
||||
<Wrapper disabled />
|
||||
<br />
|
||||
<Wrapper disabled startingValue="Has a value" />
|
||||
</>
|
||||
));
|
||||
|
|
Loading…
Reference in a new issue