Skip to content

Commit 03e01f0

Browse files
committed
docs: update docs
1 parent 074bba0 commit 03e01f0

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed

docs/docs/guides/dimming/dimming.gif

1.88 MB
Loading

docs/docs/reference/01-props.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,18 @@ Specify whether the sheet background is dimmed. Set to `false` to allow interact
8383
| - | - | - | - |
8484
| `boolean` | `true` |||
8585

86+
### `initialIndex`
87+
88+
Initially present the sheet, after loading, at a given size index.
89+
90+
| Type | Default | 🍎 | 🤖 |
91+
| - | - | - | - |
92+
| `number` | `-1` |||
93+
94+
:::info
95+
This property is only used during the initial load.
96+
:::
97+
8698
### `dimmedIndex`
8799

88100
The size index that the sheet should start to dim the background.
@@ -185,6 +197,10 @@ const App = () => {
185197
}
186198
```
187199

200+
### `onLoad`
201+
202+
This is called when the sheet is ready to present. Use this event to [`present`](reference/methods#present) the sheet during mount.
203+
188204
### `onPresent`
189205

190206
Comes with [`SizeInfo`](/reference/types#sizeinfo).

docs/static/img/preview.gif

-1.9 MB
Loading

src/TrueSheet.types.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,9 @@ export interface TrueSheetProps extends ViewProps {
131131
dimmed?: boolean
132132

133133
/**
134-
* Sets the initial size index to present during mount.
135-
* Omitting this prop will initially hide the sheet.
136-
*
137-
* @note This prop does not change the sheet's size on the fly.
138-
* Use the `present` method instead.
134+
* Initially present the sheet, after loading, at a given size index.
139135
*
136+
* @note This property is only used during the initial load.
140137
* @default -1
141138
*/
142139
initialIndex?: number
@@ -217,7 +214,7 @@ export interface TrueSheetProps extends ViewProps {
217214
FooterComponent?: ComponentType<unknown> | ReactElement
218215

219216
/**
220-
* Called when the sheet is ready to present.
217+
* This is called when the sheet is ready to present.
221218
*/
222219
onLoad?: () => void
223220

0 commit comments

Comments
 (0)