Make select disabled more clear and unify input fonts

This commit is contained in:
Mitchell McCaffrey 2020-10-10 12:15:46 +11:00
parent 0f6f9f8c42
commit f7ba35ec29
2 changed files with 13 additions and 3 deletions

View File

@ -23,6 +23,7 @@ function Select({ creatable, ...props }) {
borderColor: theme.colors.gray, borderColor: theme.colors.gray,
borderStyle: "solid", borderStyle: "solid",
borderWidth: "1px", borderWidth: "1px",
fontFamily: theme.fonts.body2,
}), }),
control: (provided, state) => ({ control: (provided, state) => ({
...provided, ...provided,
@ -33,12 +34,20 @@ function Select({ creatable, ...props }) {
singleValue: (provided, state) => ({ singleValue: (provided, state) => ({
...provided, ...provided,
color: getColor(state), color: getColor(state),
fontFamily: theme.fonts.body2,
}),
option: (provided, state) => ({
...provided,
color: getColor(state),
opacity: state.isDisabled ? 0.5 : 1,
}), }),
dropdownIndicator: (provided, state) => ({ dropdownIndicator: (provided, state) => ({
...provided, ...provided,
color: getColor(state), color: getColor(state),
":hover": { ":hover": {
color: state.isDisabled ? theme.colors.gray : theme.colors.primary, color: state.isDisabled
? theme.colors.disabled
: theme.colors.primary,
}, },
}), }),
input: (provided, state) => ({ input: (provided, state) => ({

View File

@ -24,12 +24,12 @@ export default {
}, },
}, },
fonts: { fonts: {
body: "'Bree Serif', serif", body: "'Bree Serif', Georgia, serif",
body2: body2:
"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif", "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif",
heading: "'Bree Serif', serif", heading: "'Bree Serif', serif",
monospace: "Menlo, monospace", monospace: "Menlo, monospace",
display: "'Pacifico', cursive", display: "'Pacifico', Helvetica, sans-serif",
}, },
fontSizes: [12, 14, 16, 20, 24, 32, 48, 64, 72], fontSizes: [12, 14, 16, 20, 24, 32, 48, 64, 72],
fontWeights: { fontWeights: {
@ -178,6 +178,7 @@ export default {
color: "gray", color: "gray",
borderColor: "text", borderColor: "text",
}, },
fontFamily: "body2",
}, },
slider: { slider: {
"&:disabled": { "&:disabled": {