-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from jamesplease/more-work
Continue work
- Loading branch information
Showing
14 changed files
with
95 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Disabled Focus Nodes | ||
|
||
A common UI pattern is to disable interactive elements such as buttons. This library | ||
allows you to disable Focus Nodes to achieve that same effect. | ||
|
||
Disabled nodes cannot receive focus and cannot be selected. | ||
|
||
### How to Disable Nodes | ||
|
||
Use the `disabled` prop to disable a FocusNode. | ||
|
||
```jsx | ||
function MyComponent({ isEnabled }) { | ||
return ( | ||
<FocusNode disabled={!isEnabled}> | ||
Continue | ||
</FocusNode> | ||
) | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters