Skip to content

Commit 7d720a0

Browse files
committed
fix: update Switch component snapshots
1 parent 23879c9 commit 7d720a0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/pluggableWidgets/switch-web/src/__tests__/__snapshots__/Switch.spec.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ exports[`Switch with editable value renders the structure correctly 1`] = `
77
>
88
<input
99
aria-hidden="true"
10+
class="sr-only"
1011
id="com.mendix.widgets.custom.switch1"
11-
style="opacity: 0; position: absolute; width: 1px; height: 1px;"
1212
tabindex="-1"
1313
type="checkbox"
1414
/>
@@ -35,9 +35,9 @@ exports[`Switch with readonly value renders the structure correctly 1`] = `
3535
>
3636
<input
3737
aria-hidden="true"
38+
class="sr-only"
3839
disabled=""
3940
id="com.mendix.widgets.custom.switch1"
40-
style="opacity: 0; position: absolute; width: 1px; height: 1px;"
4141
tabindex="-1"
4242
type="checkbox"
4343
/>

packages/pluggableWidgets/switch-web/src/components/Switch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function Switch(props: SwitchProps): ReactElement {
1818
type="checkbox"
1919
id={props.id}
2020
onClick={props.onClick}
21-
style={{ opacity: "0", position: "absolute", width: "1px", height: "1px" }}
21+
className="sr-only"
2222
disabled={!props.editable}
2323
tabIndex={-1}
2424
aria-hidden="true"

0 commit comments

Comments
 (0)