From 28b59aac6f5e86701d745d580ac054cdbb078852 Mon Sep 17 00:00:00 2001 From: Patrick Dillon Date: Mon, 21 Sep 2020 16:36:28 -0400 Subject: [PATCH] [DXDP-1437] Update read-only checkbox and select styles (#1727) * [DXDP-1437] Update read-only checkbox and select styles * Update snapshot * Placeholder and checkbox updates * Only apply placeholder styles if set * No hover for disabled checkboxes * Do not adjust readonly text for masked inputs * Sync radio and checkbox styles * Sync read only checkbox styles * Remove box shadow for read-only --- .../atoms/_simple-select/simple-select.tsx | 25 +- .../atoms/_styled-input/styled-input.ts | 42 +- core/components/atoms/checkbox/checkbox.tsx | 109 ++-- core/components/atoms/radio/radio.tsx | 88 ++-- core/components/atoms/select/select.story.tsx | 496 ++++++++---------- core/components/tokens/colors.ts | 302 +++++------ .../unit/__snapshots__/select.test.tsx.snap | 2 +- 7 files changed, 515 insertions(+), 549 deletions(-) diff --git a/core/components/atoms/_simple-select/simple-select.tsx b/core/components/atoms/_simple-select/simple-select.tsx index 4b3566986..597f75d5c 100644 --- a/core/components/atoms/_simple-select/simple-select.tsx +++ b/core/components/atoms/_simple-select/simple-select.tsx @@ -8,11 +8,6 @@ import { StyledInput } from "../_styled-input"; import Icon from "../icon"; import { ISelectOptions } from "../select/interfaces"; -const selectOpacity = { - default: 1, - disabled: 0.5 -}; - const PLACEHOLDER_VALUE = "0"; const valueIsUndefined = (value) => value === undefined || value === null; @@ -69,10 +64,15 @@ const SimpleSelect = ({ options, ...props }: ISimpleSelectProps) => { return ( - + {(context) => ( - + {/* First option will be selected if there is no value passed as a prop */} {props.placeholder && (