Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

feature(components): prop-type Checkbox

Alexander Klein72b91899b3f5
diff --git a/components/common/Checkbox.js b/components/common/Checkbox.js
index 1a66a2582..67eea80d8 100644
--- a/components/common/Checkbox.js
+++ b/components/common/Checkbox.js
@@ -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;