Skip to content

Support React elements in components like IconButton for server components #8447

Description

@joshblack

Currently, components like IconButton only accept a function for icons. This prevents it from being used in an RSC context since only plain objects can be passed from server to client components. For example:

<IconButton aria-label="Menu" icon={KebabHorizontalIcon} />

Will not work by default in RSC due to this limitation. Instead, we should support:

<IconButton aria-label="Menu" icon={<KebabHorizontalIcon />} />

Metadata

Metadata

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions