custom-input-aslam

0.1.0 • Public • Published

React Custom Checkbox & Radio Button

Install

npm install custom-input-aslam

Examples for custom input

import React, { Component } from 'react';
import {Radio, Checkbox} from 'custom-input-aslam';
import 'custom-input-aslam/build/index.css';

const App = () => {
	const changeHandal =(e)=>{
		// console.log(e.target.value)
		console.log(e.target.checked)
	}

	return (
			<div>
		    	<Checkbox label="Check box" value="Check box" color="red"  onChange={e=>changeHandal(e)}/>
		     <Checkbox label="Check box" value="Check box" bg="green" color="#fff" text="blue" onChange={e=>changeHandal(e)}/>
		     <Checkbox label="Check box" value="Check box" size={1.2} onChange={e=>changeHandal(e)}/>
		     <Checkbox label="Check box" value="Check box" size={0.7} />
		     <Radio label="radio1" value="radio1" defaultChecked={true} onChange={e=>changeHandal(e)}/>
		     <Radio label="radio2" value="radio2" color="red" onChange={e=>changeHandal(e)}/>
		  </div>
		)
}

Example Code

My Profile

Package Sidebar

Install

npm i custom-input-aslam

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

34.6 kB

Total Files

6

Last publish

Collaborators

  • aslamshaikh