-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[core] chore: docs improvements for Drawer, Overlay, Omnibar (#6654)
- Loading branch information
Showing
8 changed files
with
47 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
@# Drawer | ||
|
||
__Drawers__ overlay content over existing parts of the UI and are anchored to the edge of the screen. | ||
**Drawers** overlay content over existing parts of the UI and are anchored to the edge of the screen. It is built using | ||
the lower-level [**Overlay**](#core/components/overlay) component. | ||
|
||
@reactExample DrawerExample | ||
|
||
@## Props interface | ||
@## Usage | ||
|
||
__Drawer__ is a stateless React component controlled by the `isOpen` prop. | ||
`<Drawer>` is a stateless React component controlled by its `isOpen` prop. | ||
|
||
Use the `size` prop to set the size of the __Drawer__. This prop sets CSS `width` if `vertical={false}` (default) | ||
Use the `size` prop to set the size of a **Drawer**. This prop sets CSS `width` if `vertical={false}` (default) | ||
and `height` otherwise. Constants are available for common sizes: | ||
|
||
- `DrawerSize.SMALL = 360px` | ||
- `DrawerSize.STANDARD = 50%` (default) | ||
- `DrawerSize.LARGE = 90%` | ||
|
||
@## Props interface | ||
|
||
@interface DrawerProps |
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 |
---|---|---|
@@ -1,16 +1,19 @@ | ||
@# Omnibar | ||
|
||
__Omnibar__ is a macOS Spotlight-style typeahead component built using [__Overlay__](#core/components/overlay) and | ||
[__QueryList__](#select/query-list). Its usage is similar to that of [__Select__](#select/select-component): provide | ||
your items and a predicate to customize the filtering algorithm. The component is fully controlled via the `isOpen` | ||
prop, which means you can decide exactly how to trigger the component. The following example responds to a button and | ||
a hotkey. | ||
**Omnibar** is a macOS Spotlight-style typeahead component built using [**Overlay**](#core/components/overlay) and | ||
[**QueryList**](#select/query-list). Its usage is similar to that of [**Select**](#select/select-component): provide | ||
your items and a predicate to customize the filtering algorithm. | ||
|
||
`Omnibar<T>` is a _generic component_ where `<T>` represents the type of one item in the array of `items`. | ||
The following example responds to a button and a hotkey. | ||
|
||
@reactExample OmnibarExample | ||
|
||
@## Usage | ||
|
||
In TypeScript, `Omnibar<T>` is a _generic component_ where `<T>` represents the type of one item in the array of `items`. | ||
|
||
The component is fully controlled via the `isOpen` prop, which means you can decide exactly how to trigger it. | ||
|
||
@## Props interface | ||
|
||
@interface OmnibarProps | ||
|
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
fd0ee07
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[core] chore: docs improvements for Drawer, Overlay, Omnibar (#6654)
Build artifact links for this commit: documentation | landing | table | demoThis is an automated comment from the deploy-preview CircleCI job.