@overmap-ai/blocks 0.0.1-alpha.48 → 0.0.1-alpha.49
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.
- package/dist/Switch/Switch.d.ts +7 -0
- package/dist/Switch/index.d.ts +2 -0
- package/dist/Switch/typings.d.ts +13 -0
- package/dist/blocks.js +408 -376
- package/dist/blocks.js.map +1 -1
- package/dist/blocks.umd.cjs +2 -2
- package/dist/blocks.umd.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { SwitchProps } from "./typings.ts";
|
|
3
|
+
/** The Switch Component is a user interface element that allows users to toggle between two states, typically
|
|
4
|
+
* representing "on" and "off" or "enabled" and "disabled". It is commonly used for settings, preferences, or any
|
|
5
|
+
* binary options. This Switch component is a wrapper around the Radix-ui Switch component found here https://www.radix-ui.com/themes/docs/components/switch
|
|
6
|
+
*/
|
|
7
|
+
export declare const Switch: FC<SwitchProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComponentProps, ReactElement, ReactNode } from "react";
|
|
2
|
+
import { MarginProps, Switch as RadixSwitch } from "@radix-ui/themes";
|
|
3
|
+
import { Severity } from "../typings.ts";
|
|
4
|
+
interface SwitchIconProps {
|
|
5
|
+
checked: ReactNode;
|
|
6
|
+
unchecked: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface SwitchProps extends Omit<ComponentProps<typeof RadixSwitch>, "radius" | "color" | "asChild" | keyof MarginProps> {
|
|
9
|
+
severity?: Severity;
|
|
10
|
+
/** an icon or icons to be rendered within the Switch thumb on checked and unchecked states */
|
|
11
|
+
icon?: ReactElement | SwitchIconProps;
|
|
12
|
+
}
|
|
13
|
+
export {};
|