Skip to content

Commit

Permalink
Create hooks for Focus Trap and ESC listener and use in Modal,… (#351)
Browse files Browse the repository at this point in the history
Scope of this change:

Extract out a hook for the ESC handler
Extract out a hook for focus trapping
Use them in Popover, Tooltip and ModalCurtain
Convert ModalCurtain to a function component with hooks in order to allow it to use the new hooks
Extract out some Tooltip logic into a function component to use the hooks.
  • Loading branch information
lavelle authored Jun 28, 2019
1 parent f9e6968 commit 92839f8
Show file tree
Hide file tree
Showing 17 changed files with 1,564 additions and 1,577 deletions.
12 changes: 12 additions & 0 deletions packages/thumbprint-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

## Unreleased

### Added

- [Patch] Create new hook for registering an ESC listener.
- [Patch] Create new hook for trapping focus.
- [Patch] Create new utility component for conditionally using portals.

### Changed

- [Patch] Refactor ModalCurtain to be a function component and use hooks.
- [Patch] Refactor Tooltip to use the new hooks.
- [Patch] Refactor Popover to use the new hooks.

### Fixed

- [Patch] Add `muted` theme to tertiary `Button` loading state to match the button's text color. (#352)
Expand Down
Loading

0 comments on commit 92839f8

Please sign in to comment.