-
- {codeBlock`
- // At the top of the component
- const [season, setSeason] = useState(null);
-
- // Inside the render output
-
- `}
-
-
-
- Any
- Winter
- Spring
- Summer
- Fall
-
-
-
- {codeBlock`
-
- `}
-
-
-
-
-
- {codeBlock`
- // At the top of the component
- const { dispatchToast, closeToast } = useToasts();
-
- // Inside the render output
- dispatchToast(
- "example-toast",
- closeToast("example-toast")}
- >
- This is a toast.
- It will close in 10 seconds or if you click on it.
- ,
- 10_000
- )}>
- Show Toast
-
- `}
-
-
- dispatchToast(
- "example-toast",
- closeToast("example-toast")}
- >
- This is a toast.
- It will close in 10 seconds or if you click on it.
- ,
- 10_000
- )}>
- Show Toast
-
-
-
- Utils
-
-
-
- {codeBlock`
- // At the top of the component
- const [maxLines, toggleMaxLines] = useToggle(1, 0);
-
- // Inside the render output
-
-
-
-
- Lorem ipsum dolor sit amet ...
-
-
-
- Toggle text length
-
-
-
- `}
-
-
-
-
-
-
- Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
-
-
-
- Toggle text length
-
-
-
-
-
- {codeBlock`
- // At the top of the component
- const [collapse, toggleCollapse] = useToggle();
-
- // Inside the render output
-
-
-
-
- Lorem ipsum dolor sit amet ...
-
-
-
- Toggle collapse
-
-
-
- `}
-
-