Skip to content

docs: fix incorrect imports in InputOTP and Tabs code examples#352

Open
faizkhairi wants to merge 1 commit into
govtechmy:mainfrom
faizkhairi:fix/docs-incorrect-imports
Open

docs: fix incorrect imports in InputOTP and Tabs code examples#352
faizkhairi wants to merge 1 commit into
govtechmy:mainfrom
faizkhairi:fix/docs-incorrect-imports

Conversation

@faizkhairi
Copy link
Copy Markdown

Fixes #290

Summary

Documentation code examples for InputOTP and Tabs components use the internal docs-app alias @/components/myds instead of the public package path @govtechmy/myds-react/{component}. Users copying these examples would get module resolution errors.

What changed

Replaced import paths only inside code blocks (the copy-paste examples shown to developers):

Component Old (incorrect) New (correct)
InputOTP from "@/components/myds" from "@govtechmy/myds-react/input-otp"
Tabs from "@/components/myds" from "@govtechmy/myds-react/tabs"

Files changed (4)

File Code blocks fixed
input-otp.mdx 6
input-otp.ms.mdx 6
tabs.mdx 5
tabs.ms.mdx 6

What was NOT changed

Top-level MDX imports (e.g., line 9 of input-otp.mdx) remain as @/components/myds. These are consumed by the docs app's barrel re-export file (apps/docs/components/myds.tsx) for live component rendering and must stay as-is.

Verified against

The correct pattern matches other component docs (e.g., button.mdx line 40 uses @govtechmy/myds-react/button).

Replace internal alias `@/components/myds` with the public package path
`@govtechmy/myds-react/{component}` in documentation code blocks.

Fixes govtechmy#290

Only code examples (inside ``` blocks) are updated. Top-level MDX imports
remain as `@/components/myds` since the docs app barrel file needs them
for live component rendering.

- input-otp.mdx / input-otp.ms.mdx: 6 code blocks each
- tabs.mdx / tabs.ms.mdx: 5-6 code blocks each
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 23, 2026

⚠️ No Changeset found

Latest commit: 868f277

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 23, 2026

@faizkhairi is attempting to deploy a commit to the MyDIGITAL GNU Team on Vercel.

A member of the Team first needs to authorize it.

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.

DOCS: incorrect imports on several examples

1 participant