apphouse
Version:
Component library for React that uses observable state management and theme-able components.
42 lines (41 loc) • 973 B
TypeScript
import { CSSProperties } from 'glamor';
import React from 'react';
import { ApphouseComponent } from '../component.interfaces';
/**
* Interface for the styles of the ButtonToggle component
*/
export interface ButtonToggleStyles {
switch?: CSSProperties;
input?: CSSProperties;
slider?: CSSProperties;
}
/**
* Interface for the ButtonToggle component props
*/
export interface ButtonToggleProps extends ApphouseComponent<ButtonToggleStyles> {
/**
* The value of the toggle.
*/
value?: boolean;
/**
* The label of the toggle.
*/
label?: string;
/**
* The id of the toggle.
*/
id: string;
onChange?: () => void;
/**
* The scale of the toggle.
* @default 1
* @beta
*/
scale?: number;
/**
* The color of the toggle when it is on.
* @default theme.colors.brand
*/
toggleOnColor?: string;
}
export declare const ButtonToggle: React.FC<ButtonToggleProps>;