File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 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.
You can’t perform that action at this time.
0 commit comments