From 3755807b5efd4b6f228a0c03d5339c06ba0824a3 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 23 Jul 2024 22:49:37 +0100 Subject: [PATCH] Fix switch style and animate (#4814) * set height to 20+(2*hairline) * animate switch * Try to align on line height across platforms * Use border 1px --------- Co-authored-by: Samuel Newman <10959775+mozzius@users.noreply.github.com> Co-authored-by: Eric Bailey --- src/components/forms/Toggle.tsx | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/src/components/forms/Toggle.tsx b/src/components/forms/Toggle.tsx index 8036223f..502ed535 100644 --- a/src/components/forms/Toggle.tsx +++ b/src/components/forms/Toggle.tsx @@ -1,5 +1,6 @@ import React from 'react' import {Pressable, View, ViewStyle} from 'react-native' +import Animated, {LinearTransition} from 'react-native-reanimated' import {HITSLOP_10} from 'lib/constants' import { @@ -244,6 +245,7 @@ export function LabelText({ @@ -344,10 +346,10 @@ export function Checkbox() { style={[ a.justify_center, a.align_center, - a.border, a.rounded_xs, t.atoms.border_contrast_high, { + borderWidth: 1, height: 20, width: 20, }, @@ -375,34 +377,35 @@ export function Switch() { - @@ -428,10 +431,10 @@ export function Radio() { style={[ a.justify_center, a.align_center, - a.border, a.rounded_full, t.atoms.border_contrast_high, { + borderWidth: 1, height: 20, width: 20, },