Skip to content

Commit

Permalink
Add new props to ToolsPanel README
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw committed Sep 24, 2021
1 parent 0749b9b commit 84ba3b8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
14 changes: 14 additions & 0 deletions packages/components/src/tools-panel/tools-panel/README.md
Expand Up @@ -67,6 +67,13 @@ export function DimensionPanel( props ) {

## Props

### `hasInnerWrapper`: `boolean`

A function to call when the `Reset all` menu option is selected. This is passed
through to the panel's header component.

- Required: No

### `label`: `string`

Text to be displayed within the panel's header and as the `aria-label` for the
Expand All @@ -88,3 +95,10 @@ A function to call when the `Reset all` menu option is selected. This is passed
through to the panel's header component.

- Required: Yes

### `shouldRenderPlaceholderItems`: `boolean`

Advises the `ToolsPanel` that its child `ToolsPanelItem`s should render
placeholder content instead of null when they are toggled off and hidden.

- Required: No
10 changes: 5 additions & 5 deletions packages/components/src/tools-panel/types.ts
Expand Up @@ -12,6 +12,11 @@ export type ToolsPanelProps = {
* The child elements.
*/
children: ReactNode;
/**
* Flags that the items in this ToolsPanel will be contained within an inner
* wrapper element allowing the panel to lay them out accordingly.
*/
hasInnerWrapper: boolean;
/**
* Text to be displayed within the panel's header and as the `aria-label`
* for the panel's dropdown menu.
Expand All @@ -33,11 +38,6 @@ export type ToolsPanelProps = {
* placeholder content instead of null when they are toggled off and hidden.
*/
shouldRenderPlaceholderItems: boolean;
/**
* Flags that the items in this ToolsPanel will be contained within an inner
* wrapper element allowing the panel to lay them out accordingly.
*/
hasInnerWrapper: boolean;
};

export type ToolsPanelHeaderProps = {
Expand Down

0 comments on commit 84ba3b8

Please sign in to comment.