Skip to content

[accordion] Add generic Value typing - #4138

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

atomiks merged 3 commits into
mui:masterfrom
atomiks:codex/1373-accordion-generic

Conversation

@atomiks

@atomiks atomiks commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

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

pkg-pr-new Bot commented Feb 19, 2026 •

Copy link
Copy Markdown
  • base-ui-tanstack-start

  • vite-css-base-ui-example

    pnpm add https://pkg.pr.new/@base-ui/react@4138
    
    pnpm add https://pkg.pr.new/@base-ui/utils@4138
    

commit: 66b5dba

@netlify

netlify Bot commented Feb 19, 2026 •

Copy link
Copy Markdown

✅ 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

mui-bot commented Feb 19, 2026 •

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
7 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