Skip to content

Commit

Permalink
More work on guides/docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesplease committed Jun 17, 2021
1 parent c0a2457 commit 444943e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
12 changes: 10 additions & 2 deletions README.md
Expand Up @@ -35,7 +35,8 @@ This library has the following peer dependencies:
## Table of Contents

- [**Guides**](#guides)
- [Getting started](#getting-started)
- [Basic Setup](#basic-setup)
- [Getting Started](#getting-started)
- [FAQ](#faq)
- [**API Reference**](#api-reference)
- [\<FocusRoot/\>](#focusroot-)
Expand All @@ -58,7 +59,7 @@ This library has the following peer dependencies:

## Guides

### Getting Started
### Basic Setup

Render the `FocusRoot` high up in your application's component tree.

Expand Down Expand Up @@ -90,6 +91,13 @@ LRUD commands on their keyboard or remote control.
This behavior can be configured through the props of the FocusNode component. To
learn more about those props, refer to the API documentation below.

### Getting Started

The recommended way to familiarize yourself with this library is to begin by looking at the [examples](#examples). The examples
do a great job at demonstrating the kinds of interfaces you can create with this library using little code.

Once you've checked out a few examples you should be in a better position to read through these API docs!

### FAQ

#### What is LRUD?
Expand Down
14 changes: 10 additions & 4 deletions guides/exiting.md
@@ -1,7 +1,13 @@
# `isExiting`

This is an advanced prop that can help for a very particular kind of exit animation. The specific situation where this prop is helpful is:
This is an advanced prop that most people will never need to use. It exists to support one very specific situation that most apps simply
will never encounter.

- A new page is animating in while an existing page is animating out
- The user did not select a focus node to initiate the transition. For example, it may have occurred automatically due to a timeout.
- During the transition, you wish to display the focus node that is animating out in a focused state.
If the following three things are true about your situation, then you should use this prop:

1. A new page is animating in while an existing page is animating out
2. During the transition, you wish to display the focus node that is animating out in a focused state.
3. The user did not select a focus node to initiate the transition. For example, it may have occurred automatically due to a timeout.

If any of these three things are not true, then you do not need to use `isExiting`. For example, if the user selects the node, then
you should instead use the active prop to ensure that the element animates out while looking visually focused.
1 change: 0 additions & 1 deletion guides/focus.md

This file was deleted.

0 comments on commit 444943e

Please sign in to comment.