Skip to content

Commit ddc0582

Browse files
committed
Basic updates to readme
1 parent 1e19a5b commit ddc0582

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ import Interactive from 'react-interactive';
121121
- [React Interactive Advantages Over CSS](#react-interactive-advantages-over-css)
122122
- [State Machine Notes](#state-machine-notes)
123123
- [Complex Examples](#complex-examples)
124-
- [Use RI Component State to Render Your Component](#use-ri-component-state-to-render-your-component)
124+
- [Using Interactive's State in Parent Component](#using-interactives-state-in-parent-component)
125125
- [Show On `hover` and `active`](#show-on-hover-and-active)
126126
- [Show On `hover`, `touchActive` and `focusFromTab`](#show-on-hover-touchactive-and-focusfromtab)
127127
- [Hot Swappable `as`](#hot-swappable-as)
@@ -299,7 +299,7 @@ Compared to CSS, React Interactive is a simpler state machine, with better touch
299299
| `hoverActive` | `mouseOn && buttonDown && !touchDown && !focusKeyDown` |
300300
| `keyActive` | `focusKeyDown && !touchDown` |
301301
| `touchActive` | `touchDown` |
302-
The focus state boolean can be combined with any of the above states, and the `keyActive` state is only available while in the `focus` state.
302+
The `focus` state boolean can be combined with any of the above states, and the `keyActive` state is only available while in the `focus` state.
303303

304304
### CSS Interactive State Machine
305305
Note that since a state machine can only be in one state at a time, to view interactive CSS as a state machine it has to be thought of as a combination of pseudo class selectors that match based on the mouse, keyboard and touch states.
@@ -312,7 +312,7 @@ Note that since a state machine can only be in one state at a time, to view inte
312312
| `hoverActive` | Both hover and active styles applied | `(mouseOn && buttonDown)` || `(mouseOn && focusKeyDown)` || `(touchDown, but not consistent across browsers)` | `.class:hover`, `.class:active` |
313313
| `active` | Only active styles applied | `(buttonDown && !mouseOn currently, but had mouseOn when buttonDown started)` || `(focusKeyDown && !mouseOn)` || `(touchDown but not on the element currently, but not consistent across browsers)` | `.class:active` |
314314

315-
The focus state can be combined with any of the above CSS interactive states to double the total number of states that the CSS interactive state machine can be in.
315+
The `focus` state can be combined with any of the above CSS interactive states to double the total number of states that the CSS interactive state machine can be in.
316316

317317
Note that you could achieve mutually exclusive hover and active states if you apply hover styles with the `.class:hover:not(:active)` selector, and there are other states that you could generate if you wanted to using CSS selectors. You could also create a touch active state by using [Current Input](https://github.com/rafrex/current-input), so CSS has some flexibility, but it comes at the cost of simplicity, and in CSS touch and keyboard interactions are not well supported.
318318

@@ -343,7 +343,7 @@ Note that you could achieve mutually exclusive hover and active states if you ap
343343

344344
## Complex Examples
345345

346-
#### Use RI Component State to Render Your Component
346+
#### Using Interactive's State in Parent Component
347347
```javascript
348348
import React from 'react';
349349
import Interactive from 'react-interactive';

0 commit comments

Comments
 (0)