Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/afeiship/react-ant-switch
React ant switch.
https://github.com/afeiship/react-ant-switch
ant antd react switch
Last synced: about 2 months ago
JSON representation
React ant switch.
- Host: GitHub
- URL: https://github.com/afeiship/react-ant-switch
- Owner: afeiship
- License: mit
- Created: 2018-02-13T13:41:37.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-02-19T04:57:19.000Z (almost 4 years ago)
- Last Synced: 2024-12-10T10:27:58.818Z (about 2 months ago)
- Topics: ant, antd, react, switch
- Language: JavaScript
- Size: 309 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# react-ant-switch
> React ant switch.[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]## installation
```shell
npm install -S @jswork/react-ant-switch
```## properties
| Name | Type | Required | Default | Description |
| ------------ | ------ | -------- | ------- | ------------------------------------- |
| className | string | false | - | The extended className for component. |
| value | bool | false | - | The runtime value. |
| defaultValue | bool | false | - | Default value. |
| onChange | func | false | noop | The change handler. |## usage
1. import css
```scss
@import "~@jswork/react-ant-switch/dist/style.css";// or use sass
@import "~@jswork/react-ant-switch/dist/style.scss";// customize your styles:
$react-ant-switch-options: ()
```
2. import js
```js
import ReactDemokit from '@jswork/react-demokit';
import React from 'react';
import ReactDOM from 'react-dom';
import ReactAntSwitch from '@jswork/react-ant-switch';
import './assets/style.scss';class App extends React.Component {
render() {
return (
{
console.log('value:', e.target.value);
}}
/>
);
}
}ReactDOM.render(, document.getElementById('app'));
```
## documentation
- https://afeiship.github.io/react-ant-switch/## license
Code released under [the MIT license](https://github.com/afeiship/react-ant-switch/blob/master/LICENSE.txt).[version-image]: https://img.shields.io/npm/v/@jswork/react-ant-switch
[version-url]: https://npmjs.org/package/@jswork/react-ant-switch[license-image]: https://img.shields.io/npm/l/@jswork/react-ant-switch
[license-url]: https://github.com/afeiship/react-ant-switch/blob/master/LICENSE.txt[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/react-ant-switch
[size-url]: https://github.com/afeiship/react-ant-switch/blob/master/dist/react-ant-switch.min.js[download-image]: https://img.shields.io/npm/dm/@jswork/react-ant-switch
[download-url]: https://www.npmjs.com/package/@jswork/react-ant-switch