-
Notifications
You must be signed in to change notification settings - Fork 222
Re-enable MDX documentation support in Storybook v10 #4263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
794be4c
6fffa5c
ad70ecd
6a1c391
45b5828
1d805dd
42b1cb7
e01f33c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,12 @@ | ||
| import { dirname, join } from "path"; | ||
| import { fileURLToPath } from "url"; | ||
|
|
||
| const __dirname = dirname(fileURLToPath(import.meta.url)); | ||
|
|
||
| export function previewAnnotations(entry = []) { | ||
| return [...entry, require.resolve("./preview.ts")]; | ||
| return [...entry, join(__dirname, "preview.ts")]; | ||
| } | ||
|
|
||
| export function managerEntries(entry = []) { | ||
| return [...entry, require.resolve("./manager.tsx")]; | ||
| return [...entry, join(__dirname, "manager.tsx")]; | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| import type { ChangeEvent, SetStateAction } from "react"; | ||
| import type { SetStateAction } from "react"; | ||
| import { useCallback } from "react"; | ||
| import { | ||
| VscodeOption, | ||
|
|
@@ -25,8 +25,8 @@ export const CodeFlowsDropdown = ({ | |
| setSelectedCodeFlow, | ||
| }: CodeFlowsDropdownProps) => { | ||
| const handleChange = useCallback( | ||
| (e: ChangeEvent<HTMLSelectElement>) => { | ||
| const selectedOption = e.target; | ||
| (e: Event) => { | ||
| const selectedOption = e.target as HTMLSelectElement; | ||
|
Comment on lines
+28
to
+29
|
||
| const selectedIndex = parseInt(selectedOption.value); | ||
| setSelectedCodeFlow(codeFlows[selectedIndex]); | ||
| }, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,7 @@ type Props = { | |
|
|
||
| export const ModelAlertsSort = ({ value, onChange, className }: Props) => { | ||
| const handleInput = useCallback( | ||
| (e: InputEvent) => { | ||
| (e: Event) => { | ||
|
||
| const target = e.target as HTMLSelectElement; | ||
|
|
||
| onChange(target.value as SortKey); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
@storybook/componentspackage is at version 8.6.14, which is incompatible with Storybook v10.1.11. This package should be upgraded to a version that is compatible with Storybook v10 (e.g., ^10.1.11) to avoid potential runtime issues and compatibility problems.