@logo-rn/logo-toggle-button
v0.2.2
Published
<LogoToggleButton/> is a button set to let user select multiple options.
Downloads
3
Readme
@logo-rn/logo-toggle-button
is a button set to let user select multiple options.
Installation
Install the component:
npm i @logo-rn/logo-toggle-button -s
Usage
Once installed, import the component in your application:
import {LogoToggleButton} from '@logo-rn/logo-toggle-button';
import { LogoToggleButton } from '@logo-rn/logo-toggle-button';
//..
interface ButtonProps {
title?: string | undefined,
icon?: string | undefined,
isActive: boolean
}
//..
const TOGGLE_BUTTON_LIST: {
title?: string,
icon?: string,
isActive: boolean
}[] = [
{
title: "Button1",
icon: "alarm_bell_1",
isActive: false
},
{
title: "Button2",
icon: "alarm_bell_1",
isActive: false
}
]
const [buttonList, setButtonList] = React.useState(TOGGLE_BUTTON_LIST);
//..
<LogoToggleButton
buttonList={buttonList}
setButtonList={(buttonList: Array<ButtonProps>) => setButtonList(buttonList)} />