Skip to content

Commit 3454123

Browse files
committed
Fix documentation for data-color
1 parent ff5a4e2 commit 3454123

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Prop | Type | Description
7171
-------------------- | --------- | -----------
7272
`loading` | `boolean` | Displays the button's loading indicator
7373
`progress` | `number` | Number from 0.0 to 1.0
74-
`data-color` | `string` | Color applied to the button (eg. `#222`)
74+
`data-color` | `string` | Color applied to the button (`{green,red,blue,purple,mint}`)
7575
`data-size` | `string` | A [button size](#sizes)
7676
`data-style` | `string` | A [button style](#styles)
7777
`data-spinner-size` | `number` | Number representing the size of the spinner in pixels

src/LaddaButton.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class LaddaButton extends Component {
3434

3535
// Ladda props
3636
// eslint-disable-next-line react/no-unused-prop-types
37-
'data-color': PropTypes.string,
37+
'data-color': PropTypes.oneOf(['green', 'red', 'blue', 'purple', 'mint']),
3838
// eslint-disable-next-line react/no-unused-prop-types
3939
'data-size': PropTypes.oneOf(SIZES),
4040
// eslint-disable-next-line react/no-unused-prop-types

0 commit comments

Comments
 (0)