Skip to content

[accordion] Add generic Value typing #4138

Merged
atomiks merged 3 commits intomui:masterfrom
atomiks:codex/1373-accordion-generic
Feb 19, 2026
Merged

[accordion] Add generic Value typing #4138
atomiks merged 3 commits intomui:masterfrom
atomiks:codex/1373-accordion-generic

Conversation

@atomiks
Copy link
Contributor

@atomiks atomiks commented Feb 19, 2026

Same updates as #3173 and #4033

@atomiks atomiks added component: accordion Changes related to the accordion component. typescript labels Feb 19, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 19, 2026

commit: 66b5dba

@netlify
Copy link

netlify bot commented Feb 19, 2026

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 66b5dba
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6996cae87b2692000884fd2c
😎 Deploy Preview https://deploy-preview-4138--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mui-bot
Copy link

mui-bot commented Feb 19, 2026

Bundle size report

Bundle Parsed size Gzip size
@base-ui/react 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@atomiks atomiks marked this pull request as ready for review February 19, 2026 06:35
export namespace AccordionRoot {
export type State = AccordionRootState;
export type Props = AccordionRootProps;
export type Value<TValue = any> = AccordionValue<TValue>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: We could align on Value or TValue everywhere. 😃

);
});
}) as {
<Value = any>(props: AccordionRoot.Props<Value>): React.JSX.Element;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't it also need this part?

Suggested change
<Value = any>(props: AccordionRoot.Props<Value>): React.JSX.Element;
<Value = any>(props: AccordionRoot.Props<Value> & React.RefAttributes<HTMLDivElement>): React.JSX.Element;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Props interface already includes the ref (after a change a couple months ago). It looks like the others should be updated to remove it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, nice, good spot. 👍

@atomiks atomiks merged commit 8fbdf21 into mui:master Feb 19, 2026
23 checks passed
@atomiks atomiks deleted the codex/1373-accordion-generic branch February 19, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: accordion Changes related to the accordion component. typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants