From 526025daa86d9e2e35263bdc1835370213af64fe Mon Sep 17 00:00:00 2001 From: Jonathan Belcher Date: Mon, 11 May 2020 21:42:56 -0400 Subject: [PATCH] Types: Checkbox (#2023) Adds types to the Checkbox component --- lib/controls/checkbox/index.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/controls/checkbox/index.tsx b/lib/controls/checkbox/index.tsx index 3707b5cd3..d87c0c9d8 100644 --- a/lib/controls/checkbox/index.tsx +++ b/lib/controls/checkbox/index.tsx @@ -1,8 +1,12 @@ import React from 'react'; import classNames from 'classnames'; -import PropTypes from 'prop-types'; -function CheckboxControl({ className, ...props }) { +type OwnProps = React.HTMLProps & { + className?: string; + onChange: () => any; +}; + +function CheckboxControl({ className, ...props }: OwnProps) { return ( @@ -13,8 +17,4 @@ function CheckboxControl({ className, ...props }) { ); } -CheckboxControl.propTypes = { - className: PropTypes.string, -}; - export default CheckboxControl;