Skip to content

Commit 25adbaa

Browse files
author
patched.codes[bot]
committed
Patched /Users/codelion/Documents/GitHub/stack/docs/fern/docs/pages/sdk/user-button.mdx
1 parent 556609e commit 25adbaa

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: UserButton
3+
---
4+
5+
# UserButton
6+
7+
A React component that renders a user button with loading state handling. It uses React Suspense for loading fallback.
8+
9+
## Parameters
10+
11+
- `props`: `UserButtonProps` - The properties for the UserButton component.
12+
13+
## Example
14+
15+
```tsx
16+
import { UserButton } from '@stackframe/stack';
17+
18+
function MyComponent() {
19+
return (
20+
<div>
21+
<h1>Welcome</h1>
22+
<UserButton
23+
// Add any necessary UserButtonProps here
24+
/>
25+
</div>
26+
);
27+
}
28+
```
29+
30+
## Notes
31+
32+
- The component uses React Suspense for handling the loading state.
33+
- A Skeleton component is used as a fallback while the content is loading.
34+
- The actual button content is rendered by the `UserButtonInner` component once data is available.

0 commit comments

Comments
 (0)