From 74fa4b4ceb017317920c360956e5b0963a575d32 Mon Sep 17 00:00:00 2001 From: Hugo Courthias Date: Mon, 26 Feb 2024 08:19:38 +0100 Subject: [PATCH] fix(InputCode): shadow borderRadius not being applied on my Android (#157) --- src/components/inputs/input-code/components/cell.tsx | 5 +++-- src/components/inputs/input-code/input-code.utils.ts | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/inputs/input-code/components/cell.tsx b/src/components/inputs/input-code/components/cell.tsx index 9ee951c3..3be5ae33 100644 --- a/src/components/inputs/input-code/components/cell.tsx +++ b/src/components/inputs/input-code/components/cell.tsx @@ -76,7 +76,7 @@ const useStyles = ({ const borderRadius = borderRadii.lg; const shadowRaddi = borderRadius + CELL_SHADOW_WIDTH; - const { shadowColor, borderColor, backgroundColor } = getInputCellColors({ + const { borderColor, backgroundColor } = getInputCellColors({ isDisabled, isFocused, isError, @@ -90,7 +90,8 @@ const useStyles = ({ right: 0, bottom: 0, borderRadius: shadowRaddi, - backgroundColor: shadowColor ? colors[shadowColor] : undefined, + backgroundColor: isError ? colors.TERRA_100 : colors.BLUKO_100, + opacity: isFocused ? 1 : 0, }, container: { borderRadius: borderRadius, diff --git a/src/components/inputs/input-code/input-code.utils.ts b/src/components/inputs/input-code/input-code.utils.ts index 4c79f82a..60919931 100644 --- a/src/components/inputs/input-code/input-code.utils.ts +++ b/src/components/inputs/input-code/input-code.utils.ts @@ -9,7 +9,6 @@ export const getInputCellColors = ({ isFocused: boolean; isError: boolean; }): { - shadowColor?: ColorTheme; borderColor: ColorTheme; backgroundColor: ColorTheme; } => { @@ -31,7 +30,6 @@ export const getInputCellColors = ({ return { borderColor: 'BLUKO_500', backgroundColor: 'PURE_WHITE_1000', - shadowColor: 'BLUKO_100', }; }