From 923bbab6d5dfc0ebda9530edde22de7970f075c6 Mon Sep 17 00:00:00 2001 From: Aleksandr Gumroian Date: Wed, 26 Jun 2024 14:11:16 +0300 Subject: [PATCH 1/2] Add className prop to Switch component --- src/bootstrap/Switch.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/bootstrap/Switch.js b/src/bootstrap/Switch.js index de5180e..e101e0a 100644 --- a/src/bootstrap/Switch.js +++ b/src/bootstrap/Switch.js @@ -19,15 +19,16 @@ Switch.propTypes = { ]).isRequired, helpText: PropTypes.string, switchHeading: PropTypes.bool, + className: PropTypes.string, }; -function Switch({ label, helpText, switchHeading, ...props }) { +function Switch({ label, helpText, switchHeading, className, ...props }) { const uid = useUID(); return (
Date: Wed, 26 Jun 2024 14:11:54 +0300 Subject: [PATCH 2/2] Update Snapshots --- src/bootstrap/__tests__/__snapshots__/Switch.test.js.snap | 4 ++-- .../__tests__/__snapshots__/WiFiSettings.test.js.snap | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bootstrap/__tests__/__snapshots__/Switch.test.js.snap b/src/bootstrap/__tests__/__snapshots__/Switch.test.js.snap index c962d21..ae6f4ba 100644 --- a/src/bootstrap/__tests__/__snapshots__/Switch.test.js.snap +++ b/src/bootstrap/__tests__/__snapshots__/Switch.test.js.snap @@ -2,7 +2,7 @@ exports[` Render switch 1`] = `
Render switch 1`] = ` exports[` Render uncheked switch 1`] = `
Snapshot one module enabled. 1`] = ` +
+
+
+ Snapshot one module enabled. 1`] = ` +
+
+
+ Snapshot one module enabled. 1`] = ` +
+ +
+