We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4a562b8 + 0ae4f0a commit 080f4c0Copy full SHA for 080f4c0
packages/core/src/lib/Toggle/Toggle.tsx
@@ -4,6 +4,7 @@ import ToggleStyles from './Toggle.styles';
4
const { LabelStyled } = ToggleStyles;
5
6
const Toggle: React.FC<IToggleProps> = ({
7
+ isChecked,
8
customize,
9
disabled = false,
10
id = 'web3uiKit-toggle',
@@ -39,6 +40,7 @@ const Toggle: React.FC<IToggleProps> = ({
39
40
{labelOff}
41
</span>
42
<input
43
+ checked={isChecked}
44
data-testid="test-toggle-input"
45
disabled={disabled}
46
id={id}
packages/core/src/lib/Toggle/types.ts
@@ -5,6 +5,11 @@ export type ValidateCheckbox = {
};
export interface IToggleProps {
+ /**
+ * Whether the toggle is checked or not
+ */
11
+ isChecked?: boolean;
12
+
13
/**
14
* Customize the element
15
*/
0 commit comments