themes
themes copied to clipboard
#382: Refactor ThemePanel component to use useControllableState hook
@chaance Forked from https://github.com/radix-ui/themes/pull/393 by your request here
Description
Main changes:
- Allow passing optional
openandonOpenChangeprops to theThemePanelcomponent using theuseControllableStatehook - Simplify setup by merging
ThemePanelandThemePanelImplcomponents. Remove redundant interfaces
Testing steps
Use cases:
Controlled behaviour:
const [open, setOpen] = useState(false);
return <ThemePanel open={open} onOpenChange={setOpen} />
Relates issues / PRs
Refs #382
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| themes-playground | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Oct 16, 2024 1:48pm |