mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-12 07:00:28 +00:00
Checkbox props simplified
This commit is contained in:
parent
28781d2acc
commit
e11c6ea2e1
1 changed files with 2 additions and 2 deletions
|
|
@ -5,11 +5,11 @@ const Icon = require('stremio-icons/dom');
|
|||
const Button = require('../Button');
|
||||
const styles = require('./styles');
|
||||
|
||||
const Checkbox = React.forwardRef(({ children, ...props }, ref) => {
|
||||
const Checkbox = React.forwardRef((props, ref) => {
|
||||
return (
|
||||
<Button {...props} ref={ref} className={classnames(props.className, styles['checkbox-container'], { 'checked': props.checked })}>
|
||||
<Icon className={styles['icon']} icon={props.checked ? 'ic_check' : 'ic_box_empty'} />
|
||||
{React.isValidElement(children) ? children : null}
|
||||
{props.children}
|
||||
</Button>
|
||||
);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue