-
Notifications
You must be signed in to change notification settings - Fork 0
Checkbox
RSGCheckbox
is a relatively newer component introduced in 2.0.13
Preview:
You have to use the following code:
import React from 'react';
import ReactDOM from 'react-dom';
import { RSGCheckbox } from 'rsg-components';
class MainComponent extends React.Component {
render(){
return(
<div>
<RSGCheckbox/>
</div>
)
}
}
var app = document.getElementById('app');
ReactDOM.render(<MainComponent />, app);
RSGCheckbox is a void element tag and must not have children!
In version
3.0.0-beta.1
and laterRSG
is removed from the components so you have to use onlyCheckbox
instead ofRSGCheckbox
RSGCheckbox provides only one prop unique to itself named large
, which has to be either true
or false
.
The RSGCheckbox can also be passed all standard props React inputs accept (although not all of them will be functional). More info here.
It only SUPPORTS usage of the style
, checked
and onChange
props which React inputs accept. Use of other props is strictly unsupported (though all of them which do not manipulate the element should work).
RSGCheckbox
was worked very hard upon to be made as elegant as possible, much more than the other components.
Every developer can read a small tutorial and learn how to build his own checkbox styles - more information here (written by @radi-cho).
If you want to use rsg-components
(and any other thing related to React, for that matter) at it's best, I recommend you read more React docs:
And understand it's architecture and history better.
- https://en.wikipedia.org/wiki/React_(JavaScript_library)
- https://github.com/acdlite/react-fiber-architecture (For understanding React Fiber's (aka React 16+) internals)
npm install rsg-components --save
or
yarn add rsg-components