Skip to content

Commit

Permalink
Types: Checkbox (#2023)
Browse files Browse the repository at this point in the history
Adds types to the Checkbox component
  • Loading branch information
belcherj authored May 12, 2020
1 parent ec5bd6e commit 526025d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/controls/checkbox/index.tsx
Original file line number Diff line number Diff line change
@@ -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<HTMLInputElement> & {
className?: string;
onChange: () => any;
};

function CheckboxControl({ className, ...props }: OwnProps) {
return (
<span className={classNames('checkbox-control', className)}>
<input type="checkbox" {...props} />
Expand All @@ -13,8 +17,4 @@ function CheckboxControl({ className, ...props }) {
);
}

CheckboxControl.propTypes = {
className: PropTypes.string,
};

export default CheckboxControl;

0 comments on commit 526025d

Please sign in to comment.