diff --git a/src/components/Button/README.md b/src/components/Button/README.md index 9e6914e..8e7a673 100644 --- a/src/components/Button/README.md +++ b/src/components/Button/README.md @@ -51,6 +51,18 @@ import { MdPlayArrow } from 'react-icons/md'; } label="Settings" onClick={() => (console.log('clicked'))}/> ``` +### Submit Button + +`BBButton` renders `type="button"` by default, so it never submits an enclosing `
`. Pass `type="submit"` to opt in: + +```jsx +import { BBButton } from 'bbb-ui-components-react'; + + + (console.log('clicked'))}/> + +``` + ## Props | Property | Type | Default | Description | @@ -69,6 +81,7 @@ import { MdPlayArrow } from 'react-icons/md'; | `variant` | `keyof typeof VARIANTS` | `'primary'` | The variant of the button. | | `size` | `keyof typeof SIZES` | `'medium'` | The size of the button. | | `layout` | `keyof typeof LAYOUTS` | `'default'` | The layout of the button. | +| `type` | `'button' \| 'submit' \| 'reset'` | `'button'` | The native `type` attribute of the `