mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-21 15:52:02 +00:00
spread checked prop in ConsentCheckbox
This commit is contained in:
parent
e5e0bc8b38
commit
47c5665c32
1 changed files with 2 additions and 2 deletions
|
|
@ -4,7 +4,7 @@ const classnames = require('classnames');
|
||||||
const { Button, Checkbox } = require('stremio/common');
|
const { Button, Checkbox } = require('stremio/common');
|
||||||
const styles = require('./styles');
|
const styles = require('./styles');
|
||||||
|
|
||||||
const ConsentCheckbox = React.forwardRef(({ className, checked, label, link, href, onToggle, ...props }, ref) => {
|
const ConsentCheckbox = React.forwardRef(({ className, label, link, href, onToggle, ...props }, ref) => {
|
||||||
const checkboxOnClick = React.useCallback((event) => {
|
const checkboxOnClick = React.useCallback((event) => {
|
||||||
if (typeof props.onClick === 'function') {
|
if (typeof props.onClick === 'function') {
|
||||||
props.onClick(event);
|
props.onClick(event);
|
||||||
|
|
@ -22,7 +22,7 @@ const ConsentCheckbox = React.forwardRef(({ className, checked, label, link, hre
|
||||||
event.nativeEvent.togglePrevented = true;
|
event.nativeEvent.togglePrevented = true;
|
||||||
}, []);
|
}, []);
|
||||||
return (
|
return (
|
||||||
<Checkbox {...props} ref={ref} className={classnames(className, styles['consent-checkbox-container'])} checked={checked} onClick={checkboxOnClick}>
|
<Checkbox {...props} ref={ref} className={classnames(className, styles['consent-checkbox-container'])} onClick={checkboxOnClick}>
|
||||||
<div className={styles['label']}>
|
<div className={styles['label']}>
|
||||||
{label}
|
{label}
|
||||||
{' '}
|
{' '}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue