@leafygreen-ui/checkbox
Advanced tools
Comparing version 6.0.1 to 6.0.2
# @leafygreen-ui/checkbox | ||
## 6.0.2 | ||
### Patch Changes | ||
- ee7923d3: Changes how we extend the types of HTMLElements, and standardizes how we document this across readmes | ||
- Updated dependencies [ee7923d3] | ||
- @leafygreen-ui/lib@6.1.2 | ||
## 6.0.1 | ||
@@ -4,0 +12,0 @@ |
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> { | ||
import { HTMLElementProps } from '@leafygreen-ui/lib'; | ||
interface CheckboxProps extends HTMLElementProps<'input', never> { | ||
darkMode?: boolean; | ||
@@ -5,0 +6,0 @@ checked?: boolean; |
{ | ||
"name": "@leafygreen-ui/checkbox", | ||
"version": "6.0.1", | ||
"version": "6.0.2", | ||
"description": "LeafyGreen UI Kit Checkbox", | ||
@@ -23,3 +23,3 @@ "main": "./dist/index.js", | ||
"dependencies": { | ||
"@leafygreen-ui/lib": "^6.0.1" | ||
"@leafygreen-ui/lib": "^6.1.2" | ||
}, | ||
@@ -26,0 +26,0 @@ "devDependencies": { |
@@ -69,15 +69,16 @@ # Checkbox | ||
| Prop | Type | Description | Default | | ||
| --------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | | ||
| `darkMode` | `boolean` | Determines whether or not the Checkbox will appear in dark mode. | `false` | | ||
| `checked` | `boolean` | Checks the checkbox | `false` | | ||
| `label` | `node` | The label for the checkbox. | `''` | | ||
| `disabled` | `boolean` | Disables the checkbox. | `false` | | ||
| `indeterminate` | `boolean` | Sets the checkbox as indeterminate. **NOTE:** the checkbox will become out of sync with the indeterminate prop when it's clicked. Make sure to unset the `indeterminate` prop on change where you're controlling your input. | `false` | | ||
| `className` | `string` | Adds a className to the outermost element. | `''` | | ||
| `bold` | `boolean` | Determines whether the text will be bold or not. | `false` | | ||
| `animate` | `boolean` | Determines whether the checkbox will be animated when checked or unchecked. | `true` | | ||
| `id` | `string` or `number` | Adds an ID only to the input, and it's used elsewhere for accessibility props. | randomly generated string | | ||
| `onChange` | `function` | The event handler function for the `onChange` event. Receives the associated `event` object as the first argument. | `() => {}` | | ||
| Prop | Type | Description | Default | | ||
| --------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | | ||
| `darkMode` | `boolean` | Determines whether or not the Checkbox will appear in dark mode. | `false` | | ||
| `checked` | `boolean` | Checks the checkbox | `false` | | ||
| `label` | `node` | The label for the checkbox. | `''` | | ||
| `disabled` | `boolean` | Disables the checkbox. | `false` | | ||
| `indeterminate` | `boolean` | Sets the checkbox as indeterminate. **NOTE:** the checkbox will become out of sync with the indeterminate prop when it's clicked. Make sure to unset the `indeterminate` prop on change where you're controlling your input. | `false` | | ||
| `className` | `string` | Adds a className to the outermost element. | `''` | | ||
| `bold` | `boolean` | Determines whether the text will be bold or not. | `false` | | ||
| `animate` | `boolean` | Determines whether the checkbox will be animated when checked or unchecked. | `true` | | ||
| `id` | `string` or `number` | Adds an ID only to the input, and it's used elsewhere for accessibility props. | randomly generated string | | ||
| `onChange` | `function` | The event handler function for the `onChange` event. Receives the associated `event` object as the first argument. | `() => {}` | | ||
| ... | native `input` attributes | Any other props will be spread on the root `input` element | | | ||
_Any other properties will be spread on the `input` element._ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
84
665652
28
1273
Updated@leafygreen-ui/lib@^6.1.2