Skip to content

Commit ea2ccb3

Browse files
committed
make text in the disabled input gray
1 parent fae959a commit ea2ccb3

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

src/components/Form/FormSectionTitle.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const name = 'formSectionTitle';
1414
const [FormSectionTitleTag, theme] = createThemeTag(name, ({ FONTS }: *) => ({
1515
root: {
1616
...FONTS.H5,
17+
letterSpacing: '0.5px',
1718
},
1819
modifiers: {},
1920
defaults: {},

src/components/Input/Input.stories.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,9 @@ export const withKindUnderline = () => (
104104
withKindUnderline.story = {
105105
name: 'with kind="underline"',
106106
};
107+
108+
export const disabledStory = () => <Input value="hello@8base.com" name="input" onChange={ () => null } disabled />;
109+
110+
disabledStory.story = {
111+
name: 'with disabled=true',
112+
};

src/components/Input/Input.theme.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ const [InputTag, themeInput] = createThemeTag(name, ({ COLORS, SIZES, FONTS }: *
99
root: props => ({
1010
width: props.width ? `${props.width}rem` : props.stretch ? '100%' : SIZES.FIELD_WIDTH,
1111
outline: 'none',
12-
paddingLeft: props.hasLeftIcon ? '36px' : '8px',
12+
paddingTop: '1px',
13+
paddingLeft: props.hasLeftIcon ? '36px' : '15px',
1314
paddingRight: props.hasRightIcon || (props.type === 'number' && !props.hideNumberArrows) ? '48px' : '16px',
1415

1516
backgroundColor: (props.disabled || props.readOnly)
@@ -38,6 +39,7 @@ const [InputTag, themeInput] = createThemeTag(name, ({ COLORS, SIZES, FONTS }: *
3839
},
3940

4041
...FONTS.BODY_1,
42+
color: props.disabled ? COLORS.LIGHT_TEXT_COLOR : COLORS.PRIMARY_TEXT_COLOR,
4143
height: '36px',
4244
transition: 'all .15s ease-in-out',
4345

src/components/InputField/InputField.stories.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ export const common = () => (
9797
mask="999-999"
9898
stretch={ false }
9999
/>
100+
<InputField
101+
label="Email"
102+
disabled
103+
input={{ name: 'input', value: 'hello@8base.com', onChange }}
104+
/>
100105
</Column>
101106
</Grid.Box>
102107
<Grid.Box>

0 commit comments

Comments
 (0)