Skip to content

Commit

Permalink
Fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
switz committed Feb 21, 2024
1 parent 1713946 commit 7dd1682
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ const CheckoutButton = ({ items, isLoading, checkout }) => {
},
derived: {
// isDisabled resolves to a boolean if the state matches
isDisabled: ['isLoading', 'isCartInvalid'],
isDisabled: ['isLoading', 'isCartEmpty'],
// intent resolves to the value of the active state (a string here)
popover: {
isCartInvalid: 'Your cart is empty, please add items',
isCartEmpty: 'Your cart is empty, please add items',
},
intent: {
isLoading: 'none',
isCartInvalid: 'error',
isCartEmpty: 'error',
isCartValid: 'success',
}
},
Expand Down Expand Up @@ -74,7 +74,7 @@ shoppingCart.intent => 'none'
shoppingCart.popover => undefined
```

Similarly, if `isCartInvalid` is the active state:
Similarly, if `isCartEmpty` is the active state:

```js
shoppingCart.isDisabled => true
Expand Down

0 comments on commit 7dd1682

Please sign in to comment.