@stenajs-webui/elements 18.6.1 → 18.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,29 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { ButtonElementProps } from "@stenajs-webui/core";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { WidthProps } from "styled-system";
|
|
4
|
+
export declare type ToggleButtonSize = "small" | "medium" | "large";
|
|
5
|
+
export interface ToggleButtonProps extends WidthProps, Omit<ButtonElementProps, "value"> {
|
|
3
6
|
/**
|
|
4
7
|
* The label of the button.
|
|
5
8
|
*/
|
|
6
9
|
label?: string | number;
|
|
7
10
|
/**
|
|
8
|
-
* The
|
|
11
|
+
* The pressed state change handler.
|
|
9
12
|
*/
|
|
10
|
-
|
|
13
|
+
onValueChange?: (value: boolean) => void;
|
|
11
14
|
/**
|
|
12
15
|
* If true, the button will display as pressed.
|
|
13
16
|
*/
|
|
14
|
-
|
|
17
|
+
value?: boolean;
|
|
15
18
|
/**
|
|
16
|
-
*
|
|
19
|
+
* The size of the button.
|
|
17
20
|
*/
|
|
18
|
-
|
|
21
|
+
size?: ToggleButtonSize;
|
|
19
22
|
/**
|
|
20
|
-
* If true, the button will
|
|
23
|
+
* If true, the button will be disabled.
|
|
21
24
|
*/
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* The width of the button.
|
|
25
|
-
* @default Width specified in theme.
|
|
26
|
-
*/
|
|
27
|
-
width?: string;
|
|
25
|
+
disabled?: boolean;
|
|
28
26
|
}
|
|
29
|
-
export declare const ToggleButton:
|
|
27
|
+
export declare const ToggleButton: React.FC<ToggleButtonProps>;
|