@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.
@@ -7,5 +7,6 @@ export interface LabelProps extends BoxProps {
7
7
  maxCharacters?: number;
8
8
  textWidth?: BoxProps["width"];
9
9
  htmlFor?: ComponentPropsWithoutRef<"label">["htmlFor"];
10
+ labelClassName?: string;
10
11
  }
11
12
  export declare const Label: React.FC<LabelProps>;
@@ -1,29 +1,27 @@
1
- /// <reference types="react" />
2
- export interface ToggleButtonProps {
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 click handler.
11
+ * The pressed state change handler.
9
12
  */
10
- onClick?: (pressed: boolean) => void;
13
+ onValueChange?: (value: boolean) => void;
11
14
  /**
12
15
  * If true, the button will display as pressed.
13
16
  */
14
- pressed?: boolean;
17
+ value?: boolean;
15
18
  /**
16
- * If true, the button will have rounded corners on the left side.
19
+ * The size of the button.
17
20
  */
18
- first?: boolean;
21
+ size?: ToggleButtonSize;
19
22
  /**
20
- * If true, the button will have rounded corners on the right side.
23
+ * If true, the button will be disabled.
21
24
  */
22
- last?: boolean;
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: ({ label, pressed, first, last, width, onClick, }: ToggleButtonProps) => JSX.Element;
27
+ export declare const ToggleButton: React.FC<ToggleButtonProps>;