mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
feature(components): prop-type Checkbox
This commit is contained in:
parent
244fd6e494
commit
72b91899b3
1 changed files with 11 additions and 1 deletions
|
|
@ -1,9 +1,10 @@
|
|||
import React, { useRef } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Icon from 'components/common/Icon';
|
||||
import Check from 'assets/check.svg';
|
||||
import styles from './Checkbox.module.css';
|
||||
|
||||
export default function Checkbox({ name, value, label, onChange }) {
|
||||
function Checkbox({ name, value, label, onChange }) {
|
||||
const ref = useRef();
|
||||
|
||||
return (
|
||||
|
|
@ -25,3 +26,12 @@ export default function Checkbox({ name, value, label, onChange }) {
|
|||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Checkbox.propTypes = {
|
||||
name: PropTypes.string,
|
||||
value: PropTypes.any,
|
||||
label: PropTypes.node,
|
||||
onChange: PropTypes.func,
|
||||
};
|
||||
|
||||
export default Checkbox;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue