Skip to content

Commit

Permalink
README fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bvaughn committed Mar 18, 2023
1 parent d886c81 commit a3aea0c
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions packages/react-resizable-panels/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,18 @@ import { Panel, PanelGroup, PanelResizeHandle } from "react-resizable-panels";
## Props

### `PanelGroup`
| prop | type | description
| :--------------------------------- | :----------------------------- | :---
| `autoSaveId` | `?string` | Unique id used to auto-save group arrangement via `localStorage`
| `children` | `ReactNode` | Arbitrary React element(s)
| `className` | `?string` | Class name to attach to root element
| `direction` | `"horizontal" \| "vertical"` | Group orientation
| `disablePointerEventsDuringResize` | `?boolean = false` | Disable pointer events inside `Panel`s during resize <sup>2</sup>
| `id` | `?string` | Group id; falls back to `useId` when not provided
| `onDragging` | `?(isDragging: boolean) => void` | Called when group layout changes
| `onLayout` | `?(sizes: number[]) => void` | Called when group layout changes
| `storage` | `?PanelGroupStorage` | Custom storage API; defaults to `localStorage` <sup>1</sup>
| `style` | `?CSSProperties` | CSS style to attach to root element
| `tagName` | `?string = "div"` | HTML element tag name for root element
| prop | type | description
| :--------------------------------- | :--------------------------- | :---
| `autoSaveId` | `?string` | Unique id used to auto-save group arrangement via `localStorage`
| `children` | `ReactNode` | Arbitrary React element(s)
| `className` | `?string` | Class name to attach to root element
| `direction` | `"horizontal" \| "vertical"` | Group orientation
| `disablePointerEventsDuringResize` | `?boolean = false` | Disable pointer events inside `Panel`s during resize <sup>2</sup>
| `id` | `?string` | Group id; falls back to `useId` when not provided
| `onLayout` | `?(sizes: number[]) => void` | Called when group layout changes
| `storage` | `?PanelGroupStorage` | Custom storage API; defaults to `localStorage` <sup>1</sup>
| `style` | `?CSSProperties` | CSS style to attach to root element
| `tagName` | `?string = "div"` | HTML element tag name for root element

<sup>1</sup>: Storage API must define the following _synchronous_ methods:
* `getItem: (name:string) => string`
Expand Down Expand Up @@ -70,14 +69,15 @@ import { Panel, PanelGroup, PanelResizeHandle } from "react-resizable-panels";
| `resize(percentage: number)` | Resize panel to the specified _percentage_ (`1 - 100`).

### `PanelResizeHandle`
| prop | type | description
| :------------ | :---------------- | :---
| `children` | `?ReactNode` | Custom drag UI; can be any arbitrary React element(s)
| `className` | `?string` | Class name to attach to root element
| `disabled` | `?boolean` | Disable drag handle
| `id` | `?string` | Resize handle id (unique within group); falls back to `useId` when not provided
| `style` | `?CSSProperties` | CSS style to attach to root element
| `tagName` | `?string = "div"` | HTML element tag name for root element
| prop | type | description
| :------------ | :------------------------------- | :---
| `children` | `?ReactNode` | Custom drag UI; can be any arbitrary React element(s)
| `className` | `?string` | Class name to attach to root element
| `disabled` | `?boolean` | Disable drag handle
| `id` | `?string` | Resize handle id (unique within group); falls back to `useId` when not provided
| `onDragging` | `?(isDragging: boolean) => void` | Called when group layout changes
| `style` | `?CSSProperties` | CSS style to attach to root element
| `tagName` | `?string = "div"` | HTML element tag name for root element
---

#### If you like this project, [buy me a coffee](http://givebrian.coffee/).

0 comments on commit a3aea0c

Please sign in to comment.