0.3.1-alpha.3 • Published 6 months ago
@react-to-styled/toggle v0.3.1-alpha.3
React to styled toggle
Package for simple css-in-js switch component.
Installation
We suggest this package to be imported
Install with npm:
npm install @react-to-styled/toggle
Install with yarn:
yarn add @react-to-styled/toggle
Import
import { Toggle, ToggleProps } from '@react-to-styled/toggle'
Dependencies
All our components depend on these dependencies
{
"peerDependencies": {
"react": ">=16.8.0",
"react-dom": ">=16.8.0",
"styled-components": ">=5"
}
}
Usage
Here is a quick example how to add Loader:
import React, { useState } from 'react'
import ReactDOM from 'react-dom'
import { Toggle } from '@react-to-styled/toggle'
function App() {
const [checked, setChecked] = useState()
return (
<Toggle checked={checked} onChange={e => setChecked(e.target.checked)} />
)
}
ReactDOM.render(<App />, document.querySelector('#app'))
You can also check our storybook for more examples
0.3.1-alpha.3
6 months ago
0.3.1-alpha.1
2 years ago
0.3.1-alpha.2
2 years ago
0.3.0
2 years ago
0.3.0-alpha.5
2 years ago
0.3.0-alpha.4
2 years ago
0.3.0-alpha.3
2 years ago
0.3.0-alpha.2
2 years ago
0.3.0-alpha.1
2 years ago
0.3.0-alpha.0
2 years ago
0.2.9-alpha.3
2 years ago
0.2.9-alpha.2
2 years ago
0.2.9-alpha.1
2 years ago
0.2.9-alpha.0
2 years ago
0.2.8-alpha.1
2 years ago
0.2.7
2 years ago
0.2.0
2 years ago
0.1.3
2 years ago
0.1.2
2 years ago