{"_id":"@adrianhwang/react-native-material-switch","_rev":"3-f4ae1633d41ef046da243ac01adf4feb","name":"@adrianhwang/react-native-material-switch","description":"Customizable material style switch","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.4":{"name":"@adrianhwang/react-native-material-switch","version":"0.0.4","description":"Customizable material style switch","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+ssh://git@github.com/Recr0ns/react-native-material-switch.git"},"keywords":["react-native","react-component","ios","switch","material"],"author":{"name":"Eduard Tishkin","email":"recr0ns@gmail.com","url":"https://github.com/recr0ns"},"license":"MIT","bugs":{"url":"https://github.com/recr0ns/react-native-material-switch/issues"},"homepage":"https://github.com/recr0ns/react-native-material-switch","peerDependencies":{"react-native":">= 0.9.0 || 0.11.0-rc"},"gitHead":"853e22d5a60d9a69bb0437f3ebe5d501ff7f9de0","_id":"@adrianhwang/react-native-material-switch@0.0.4","_shasum":"a146704ce10640d6b9896fdde40a5501ba9a3cc9","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"adrianhwang","email":"boardsky@126.com"},"dist":{"shasum":"a146704ce10640d6b9896fdde40a5501ba9a3cc9","tarball":"https://registry.npmjs.org/@adrianhwang/react-native-material-switch/-/react-native-material-switch-0.0.4.tgz","integrity":"sha512-PgkbbInBQ0hG0DW15pmaR5Sigt9MnlELF/OnBvixVsT5YP+v4OpCiQB3auj7f+wRaODT3SQMcwFFdjn6EwaOrA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/k44xhqvq4sV/u+OrfXDcWbDSigpFsCDeIo25OcHk4gIhAOc7+18KuncbcG/Z/TDvnIKyzaeqkzn/KnYsTSiG0jGX"}]},"maintainers":[{"name":"adrianhwang","email":"boardsky@126.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/react-native-material-switch-0.0.4.tgz_1475042263208_0.14279842167161405"}}},"readme":"## Customizable material switch for react-native\n<p align=\"center\">\n    <img src =\"http://oi57.tinypic.com/2rysl94.jpg\" />\n</p>\n\n### Content\n- [Installation](#installation)\n- [Usage example](#usage-example)\n- [Properties](#properties)\n- [Events](#events)\n- [Live example](#live-example)\n- [Questions?](#questions)\n\n### Installation\n```bash\nnpm install react-native-material-switch\n```\n\n### Usage example\n```javascript\nvar Switch = require('react-native-material-switch');\n\nvar Application = React.createClass({\n  render: function() {\n    return (\n      <View>\n        <Switch onChangeState={(state)=>{alert(state)}}/>\n      </View>\n    );\n  }\n});\n```\n\n### Properties\n* `active` (Boolean) - Initial switch state (default: false),\n* `style` (Object) - Styles for outer container (margins, ...),\n* `inactiveButtonColor` (String) - Button color  (default: '#2196F3'),\n* `inactiveButtonPressedColor` (String) (default: '#42A5F5'),\n* `activeButtonColor` (String) (default: '#FAFAFA'),\n* `activeButtonPressedColor` (String) (default: '#F5F5F5'),\n* `buttonShadow` (Object) - Shadow style for button (default: { shadowColor: '#000', shadowOpacity: 0.5, shadowRadius: 1, shadowOffset: { height: 1, width: 0 }},\n* `activeBackgroundColor` (String) - (default: 'rgba(255,255,255,.5)'),\n* `inactiveBackgroundColor` (String) - (default: 'rgba(0,0,0,.5)'),\n* `buttonRadius` (Number) - (default: 15),\n* `switchWidth` (Number) - (default: 40),\n* `switchHeight` (Number) - (default: 20),\n* `buttonContent` (React.Component) - Custom inline content for switch button (default: null),\n* `enableSlide` (Boolean) - (default: true),\n* `switchAnimationTime` (Number) - Switch animation duration (default: 200),\n\n### Events\n* `onActivate`: This function is called when the switch is activated.\n* `onDeactivate`: This function is called when the switch is deactivated.\n* `onChangeState`: Sends the current state of switch.\n\n### Live example\n```sh\ngit clone git@github.com:Recr0ns/react-native-material-switch.git\ncd react-native-material-switch/examples\nnpm install\nopen ios/switchExample.xcodeproj\n```\nThen `Cmd+R` to start the React Packager, build and run the project in the simulator.\n\n### License\nMIT License\n\n### Questions?\nFeel free to [create an issue](https://github.com/Recr0ns/react-native-material-switch/issues)\n","maintainers":[{"name":"adrianhwang","email":"boardsky@126.com"}],"time":{"modified":"2022-06-12T14:19:40.965Z","created":"2016-09-28T05:57:44.928Z","0.0.4":"2016-09-28T05:57:44.928Z"},"homepage":"https://github.com/recr0ns/react-native-material-switch","keywords":["react-native","react-component","ios","switch","material"],"repository":{"type":"git","url":"git+ssh://git@github.com/Recr0ns/react-native-material-switch.git"},"author":{"name":"Eduard Tishkin","email":"recr0ns@gmail.com","url":"https://github.com/recr0ns"},"bugs":{"url":"https://github.com/recr0ns/react-native-material-switch/issues"},"license":"MIT","readmeFilename":"README.md"}