Start sharing components as a team!Share components as a team!Join Bit to build your applications faster.Get Started Free

toggle-button

v0.0.3arrow_drop_down
v0.0.3
v0.0.2
v0.0.1
STATUS
Passing
DOWNLOADS
91
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
6 months ago
SIZE
8 KB
Renders an icon and a text into an `PrimaryButton`.
1 contributor
Use toggle-button in your project ?
Copied
npm i @bit/lekanmedia.shared-ui.toggle-button
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Component Example
React
React
Vue
Angular
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
modifieddraft
chevron_left
chevron_right
ToggleButton (
props.addClass:string,
props.width:number,
props.height:number,
props.color:string,
props.disabled:boolean,
props.onToggle:function
) : JSX.Element

Renders an icon and a text into an PrimaryButton.

Arguments
props.addClass: string

Add extra class styles to overwrite default class.

props.width: number

Width of the button: defaults to 40.

props.height: number

Height of the button: defaults to 25.

props.color: string

Color for the toggle: defaults to #3b73ff.

props.disabled: boolean

Disables the toggle button.

props.onToggle: function

onclick event function of the button: receives the state Boolean of the toggle as an argument.

Returns
JSX.Element

A toggle button.