-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
Feature request summary
We are building a plain button, who would be displayed at a polaris Badge, however, the button children does not accept React.ReactNode type.
Rationale
The button we are building is like below:
const status =(<Badge status="success">Passing</Badge>);
const activator = (
<Button plain onClick={togglePopoverActive} disclosure>
{status}
</Button>
);The react typecheck complains {status}: error TS2322: Type 'Element' is not assignable to type 'string | string[] | undefined', this is because https://github.com/Shopify/polaris-react/blame/main/src/components/Button/Button.tsx#L25
We think users should be given more flexibility on building their buttons, give more style and etc.
🌟 Feature requests that are not yet planned will be closed. We then use the issue’s 👍 upvotes to track and set priorities. See the contribution guidelines for more information.
ckelly and tawago