Skip to content
This repository was archived by the owner on Mar 8, 2023. It is now read-only.

Commit e952530

Browse files
authored
Merge pull request #144 from strapi/fix/inputs-color
Fix/inputs color
2 parents 7989762 + e456c2d commit e952530

File tree

10 files changed

+24
-2
lines changed

10 files changed

+24
-2
lines changed

packages/buffetjs-core/src/components/DatePicker/tests/__snapshots__/index.test.js.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,13 @@ exports[`<DatePicker /> should match snapshot 1`] = `
215215
.c3:disabled {
216216
background-color: #FAFAFB;
217217
cursor: not-allowed;
218+
color: #9ea7b8;
218219
}
219220
220221
.c1 {
221222
position: relative;
222223
background-color: #ffffff;
224+
border-radius: 2px;
223225
}
224226
225227
.c1 button[type='button'] {

packages/buffetjs-core/src/components/TimePicker/index.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44
*
55
*/
66

7-
import React, { useEffect, useState, useRef, useMemo } from 'react';
7+
import React, {
8+
useCallback,
9+
useEffect,
10+
useState,
11+
useRef,
12+
useMemo,
13+
} from 'react';
814
import { isInteger, toNumber } from 'lodash';
915
import PropTypes from 'prop-types';
1016

@@ -232,6 +238,8 @@ function TimePicker(props) {
232238
updateTime(target.value);
233239
};
234240

241+
const handleChangeRadio = useCallback(() => {}, []);
242+
235243
const formatInputValue = time => {
236244
if (!seconds) {
237245
setInputVal(short(time));
@@ -277,7 +285,8 @@ function TimePicker(props) {
277285
<li key={option.value} ref={listRefs[option.value]}>
278286
<input
279287
type="radio"
280-
onChange={handleClick}
288+
onChange={handleChangeRadio}
289+
onClick={handleClick}
281290
value={option.value}
282291
id={option.value}
283292
name="time"

packages/buffetjs-styles/src/components/InputNumber/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ const InputNumber = styled.div`
149149
&:disabled {
150150
cursor: not-allowed;
151151
background-color: ${colors.greyIconBkgd};
152+
color: ${colors.brightGrey};
153+
opacity: 1;
152154
}
153155
}
154156
.rc-input-number-handler-wrap {

packages/buffetjs-styles/src/components/InputText/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const InputText = styled.input`
3434
&:disabled {
3535
background-color: ${colors.greyIconBkgd};
3636
cursor: not-allowed;
37+
color: ${colors.brightGrey};
3738
}
3839
3940
${props =>

packages/buffetjs-styles/src/components/InputWrapper/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import sizes from '../../assets/styles/sizes';
1111
const InputWrapper = styled.div`
1212
position: relative;
1313
background-color: ${colors.white};
14+
border-radius: ${sizes.borderRadius};
1415
button[type='button'] {
1516
width: ${sizes.input.height};
1617
height: ${sizes.input.height};

packages/buffetjs-styles/src/components/Select/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ const Select = styled.select`
3838
&:disabled {
3939
background-color: ${colors.greyIconBkgd};
4040
cursor: not-allowed;
41+
color: ${colors.brightGrey};
42+
opacity: 1;
4143
}
4244
`;
4345

packages/buffetjs-styles/src/components/Textarea/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const StyledTextarea = styled.textarea`
3030
&:disabled {
3131
background-color: ${colors.greyIconBkgd};
3232
cursor: not-allowed;
33+
color: ${colors.brightGrey};
3334
}
3435
`;
3536

packages/buffetjs-styles/src/components/Textarea/tests/__snapshots__/index.test.js.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ exports[`<Textarea /> should match the snapshot when empty 1`] = `
2727
.c0:disabled {
2828
background-color: #FAFAFB;
2929
cursor: not-allowed;
30+
color: #9ea7b8;
3031
}
3132
3233
<textarea
@@ -62,6 +63,7 @@ exports[`<Textarea /> should match the snapshot when not empty 1`] = `
6263
.c0:disabled {
6364
background-color: #FAFAFB;
6465
cursor: not-allowed;
66+
color: #9ea7b8;
6567
}
6668
6769
<textarea

packages/buffetjs-styles/src/components/TimePicker/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const TimePicker = styled.input`
3131
}
3232
&:disabled {
3333
cursor: not-allowed;
34+
color: ${colors.brightGrey};
3435
}
3536
`;
3637

packages/buffetjs-styles/src/components/TimePickerWrapper/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const TimePickerWrapper = styled.div`
1212
max-width: 95px;
1313
position: relative;
1414
background-color: ${colors.white};
15+
border-radius: ${sizes.borderRadius};
1516
span {
1617
z-index: 0;
1718
border-top-left-radius: ${sizes.borderRadius};

0 commit comments

Comments
 (0)