themes icon indicating copy to clipboard operation
themes copied to clipboard

#382: Refactor ThemePanel component to use useControllableState hook

Open snelsi opened this issue 1 year ago • 1 comments

@chaance Forked from https://github.com/radix-ui/themes/pull/393 by your request here

Description

Main changes:

  • Allow passing optional open and onOpenChange props to the ThemePanel component using the useControllableState hook
  • Simplify setup by merging ThemePanel and ThemePanelImpl components. 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

snelsi avatar Oct 16 '24 13:10 snelsi

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

vercel[bot] avatar Oct 16 '24 13:10 vercel[bot]