Skip to content

Fix shape of nextThemes#4891

Merged
dimaMachina merged 5 commits intoshuding:mainfrom
tstirrat15:add-next-themes-props
Apr 6, 2026
Merged

Fix shape of nextThemes#4891
dimaMachina merged 5 commits intoshuding:mainfrom
tstirrat15:add-next-themes-props

Conversation

@tstirrat15
Copy link
Copy Markdown
Contributor

@tstirrat15 tstirrat15 commented Jan 13, 2026

Why:

I wanted to use value to allow for dark mode usage with swagger-ui-react, which uses a different dark mode classname.

The zod schema disallowed this and threw an error.

Closes:

N/A

What's being changed (if available, include any code snippets, screenshots, or gifs):

This adds the rest of the props listed here to the zod schema.

Check off the following:

  • I have reviewed my changes in staging, available via the View
    deployment
    link in this PR's timeline (this link will be available after
    opening the PR).

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jan 13, 2026

🦋 Changeset detected

Latest commit: 7582ac7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
nextra-theme-docs Patch
nextra Patch
nextra-theme-blog Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nextra-v2 Ready Ready Preview, Comment Apr 6, 2026 11:36pm

Request Review

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 13, 2026

@tstirrat15 is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@peterkogo
Copy link
Copy Markdown

I am running into the same issue.

In my case, I am not able to pass

nextThemes={{
  attribute: ['class', 'data-theme'],
}}

because the schema tries to call (value as string).startsWith which is not available with an array.

Comment thread .changeset/silly-pianos-listen.md Outdated
@dimaMachina
Copy link
Copy Markdown
Collaborator

@copilot review

Comment thread packages/nextra-theme-docs/src/schemas.tsx Outdated
@dimaMachina dimaMachina merged commit c1a6a48 into shuding:main Apr 6, 2026
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants