From f7ba35ec29d40a03feabcfd3202bf9d86c22c191 Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Sat, 10 Oct 2020 12:15:46 +1100 Subject: [PATCH] Make select disabled more clear and unify input fonts --- src/components/Select.js | 11 ++++++++++- src/theme.js | 5 +++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/components/Select.js b/src/components/Select.js index e7ed8f7..3eca369 100644 --- a/src/components/Select.js +++ b/src/components/Select.js @@ -23,6 +23,7 @@ function Select({ creatable, ...props }) { borderColor: theme.colors.gray, borderStyle: "solid", borderWidth: "1px", + fontFamily: theme.fonts.body2, }), control: (provided, state) => ({ ...provided, @@ -33,12 +34,20 @@ function Select({ creatable, ...props }) { singleValue: (provided, state) => ({ ...provided, color: getColor(state), + fontFamily: theme.fonts.body2, + }), + option: (provided, state) => ({ + ...provided, + color: getColor(state), + opacity: state.isDisabled ? 0.5 : 1, }), dropdownIndicator: (provided, state) => ({ ...provided, color: getColor(state), ":hover": { - color: state.isDisabled ? theme.colors.gray : theme.colors.primary, + color: state.isDisabled + ? theme.colors.disabled + : theme.colors.primary, }, }), input: (provided, state) => ({ diff --git a/src/theme.js b/src/theme.js index d0698ac..1baef2c 100644 --- a/src/theme.js +++ b/src/theme.js @@ -24,12 +24,12 @@ export default { }, }, fonts: { - body: "'Bree Serif', serif", + body: "'Bree Serif', Georgia, serif", body2: "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif", heading: "'Bree Serif', serif", monospace: "Menlo, monospace", - display: "'Pacifico', cursive", + display: "'Pacifico', Helvetica, sans-serif", }, fontSizes: [12, 14, 16, 20, 24, 32, 48, 64, 72], fontWeights: { @@ -178,6 +178,7 @@ export default { color: "gray", borderColor: "text", }, + fontFamily: "body2", }, slider: { "&:disabled": {