From 6437352feda731964728113b1b29cdeda1571666 Mon Sep 17 00:00:00 2001 From: Igor Randjelovic Date: Mon, 21 Feb 2022 23:22:26 +0100 Subject: [PATCH] feat(switch): :checked pseudo and color fixes (#9790) --- apps/toolbox/src/app.css | 20 +++++++ apps/toolbox/src/main-page.xml | 11 ++-- apps/toolbox/src/pages/switch.ts | 14 +++++ apps/toolbox/src/pages/switch.xml | 75 ++++++++++++++++++++++++ packages/core/ui/switch/index.android.ts | 8 ++- packages/core/ui/switch/index.ios.ts | 69 +++++++++++++++++++--- packages/core/ui/switch/switch-common.ts | 6 +- 7 files changed, 188 insertions(+), 15 deletions(-) create mode 100644 apps/toolbox/src/pages/switch.ts create mode 100644 apps/toolbox/src/pages/switch.xml diff --git a/apps/toolbox/src/app.css b/apps/toolbox/src/app.css index 8589cefaa..0e77e788e 100644 --- a/apps/toolbox/src/app.css +++ b/apps/toolbox/src/app.css @@ -201,4 +201,24 @@ Button { .a11y-demo-page .a11y-state-checked { a11y-state: checked; +} + +.switch-demo-page Switch.custom-switch { + color: #ddd; + background-color: #65adf1; +} + +.switch-demo-page Switch.custom-switch:checked { + color: #111; + background-color: #65adf1; +} + +.switch-demo-page Switch.custom-switch:disabled { + color: #777; + background-color: #ddd; +} + +.switch-demo-page Switch.custom-switch:disabled:checked { + color: #ddd; + background-color: #777; } \ No newline at end of file diff --git a/apps/toolbox/src/main-page.xml b/apps/toolbox/src/main-page.xml index 667e9e9a5..34a1d1a22 100644 --- a/apps/toolbox/src/main-page.xml +++ b/apps/toolbox/src/main-page.xml @@ -6,15 +6,16 @@ -