This repository has been archived by the owner on May 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added isBlock prop to Switch. (#3122)
* Added isBlock prop to Switch * revereted form_factors added for testing * linter error * updated doc comments * grammar corrections Co-authored-by: Saket Bajaj <42207428+saket2403@users.noreply.github.com>
- Loading branch information
1 parent
892cfc0
commit cb21284
Showing
18 changed files
with
140 additions
and
1 deletion.
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
16 changes: 16 additions & 0 deletions
16
packages/terra-switch/src/terra-dev-site/doc/example/BlockSwitch.jsx
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,16 @@ | ||
import React, { useState } from 'react'; | ||
import Switch from 'terra-switch'; | ||
|
||
const BlockSwitch = () => { | ||
const [value, setValue] = useState(true); | ||
return ( | ||
<Switch | ||
isChecked={value} | ||
labelText="Block Switch with Long Label Text" | ||
isBlock | ||
onChange={setValue} | ||
/> | ||
); | ||
}; | ||
|
||
export default BlockSwitch; |
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
17 changes: 17 additions & 0 deletions
17
packages/terra-switch/src/terra-dev-site/test/switch/BlockSwitch.test.jsx
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,17 @@ | ||
import React, { useState } from 'react'; | ||
import Switch from '../../../Switch'; | ||
|
||
const BlockSwitch = () => { | ||
const [value, setValue] = useState(false); | ||
return ( | ||
<Switch | ||
id="blockSwitch" | ||
isChecked={value} | ||
labelText="Label" | ||
isBlock | ||
onChange={setValue} | ||
/> | ||
); | ||
}; | ||
|
||
export default BlockSwitch; |
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
Binary file added
BIN
+2.16 KB
...e/clinical-lowlight-theme/en/chrome_large/switch-spec/Block_Switch[default].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.1 KB
.../clinical-lowlight-theme/en/chrome_medium/switch-spec/Block_Switch[default].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.99 KB
...ce/clinical-lowlight-theme/en/chrome_tiny/switch-spec/Block_Switch[default].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.05 KB
...o/__snapshots__/reference/en/chrome_large/switch-spec/Block_Switch[default].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3 KB
.../__snapshots__/reference/en/chrome_medium/switch-spec/Block_Switch[default].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.88 KB
...io/__snapshots__/reference/en/chrome_tiny/switch-spec/Block_Switch[default].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.71 KB
...erence/orion-fusion-theme/en/chrome_large/switch-spec/Block_Switch[default].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.66 KB
...rence/orion-fusion-theme/en/chrome_medium/switch-spec/Block_Switch[default].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.55 KB
...ference/orion-fusion-theme/en/chrome_tiny/switch-spec/Block_Switch[default].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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