-
Notifications
You must be signed in to change notification settings - Fork 843
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert
EuiSwitch
conversions (#2255)
* Revert "Convert `EuiSwitch` to TS (#2243)" This reverts commit 39dbcf6. * Revert "Aligning switch semantics with aria role (#2193)" This reverts commit 76e58de. * CL
- Loading branch information
1 parent
8502a0b
commit e152ece
Showing
14 changed files
with
268 additions
and
257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
src/components/form/switch/__snapshots__/switch.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`EuiSwitch assigns automatically generated ID to label 1`] = ` | ||
<div | ||
class="euiSwitch" | ||
> | ||
<input | ||
class="euiSwitch__input" | ||
id="generated-id" | ||
type="checkbox" | ||
/> | ||
<span | ||
class="euiSwitch__body" | ||
> | ||
<span | ||
class="euiSwitch__thumb" | ||
/> | ||
<span | ||
class="euiSwitch__track" | ||
> | ||
<svg | ||
class="euiIcon euiIcon--medium euiIcon-isLoading euiSwitch__icon" | ||
focusable="false" | ||
height="16" | ||
viewBox="0 0 16 16" | ||
width="16" | ||
xmlns="http://www.w3.org/2000/svg" | ||
/> | ||
<svg | ||
class="euiIcon euiIcon--medium euiIcon-isLoading euiSwitch__icon euiSwitch__icon--checked" | ||
focusable="false" | ||
height="16" | ||
viewBox="0 0 16 16" | ||
width="16" | ||
xmlns="http://www.w3.org/2000/svg" | ||
/> | ||
</span> | ||
</span> | ||
</div> | ||
`; | ||
|
||
exports[`EuiSwitch is rendered 1`] = ` | ||
<div | ||
class="euiSwitch testClass1 testClass2" | ||
> | ||
<input | ||
aria-label="aria-label" | ||
class="euiSwitch__input" | ||
data-test-subj="test subject string" | ||
id="test" | ||
type="checkbox" | ||
/> | ||
<span | ||
class="euiSwitch__body" | ||
> | ||
<span | ||
class="euiSwitch__thumb" | ||
/> | ||
<span | ||
class="euiSwitch__track" | ||
> | ||
<svg | ||
class="euiIcon euiIcon--medium euiIcon-isLoading euiSwitch__icon" | ||
focusable="false" | ||
height="16" | ||
viewBox="0 0 16 16" | ||
width="16" | ||
xmlns="http://www.w3.org/2000/svg" | ||
/> | ||
<svg | ||
class="euiIcon euiIcon--medium euiIcon-isLoading euiSwitch__icon euiSwitch__icon--checked" | ||
focusable="false" | ||
height="16" | ||
viewBox="0 0 16 16" | ||
width="16" | ||
xmlns="http://www.w3.org/2000/svg" | ||
/> | ||
</span> | ||
</span> | ||
</div> | ||
`; |
97 changes: 0 additions & 97 deletions
97
src/components/form/switch/__snapshots__/switch.test.tsx.snap
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.