You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The prop table is populated with my prop types / descriptions but ONLY if a type is declared in the same file as the component.
This works:
// chart.js// @flowtypewidgetPropsT={/** The title of the chart */title: string,/** The subtitle of the chart */subtitle: string,/** The Description to display in the Tooltip */description: string,/** Displays the loading state */loading?: boolean,/** Displays the error state */errors?: boolean};typeProps=widgetPropsT&{/** The data to display */graphData: {key: string,label: string,unitType: unitTypeT,type: displayChartTypeEnum,chartData: chartDataT[]}[]};contChart=({
title,
subtitle,
description,
graphData,
loading,
errors
}: Props)=>{
...
}
But because widgetPropsT is common i'd like to keep it in a common place eg:
// chart.js// @flowimporttype{widgetPropsT}from'../common/types';typeProps=widgetPropsT&{/** The data to display */graphData: {key: string,label: string,unitType: unitTypeT,type: displayChartTypeEnum,chartData: chartDataT[]}[]};contChart=({
title,
subtitle,
description,
graphData,
loading,
errors
}: Props)=>{
...
}
But when i do this only the graphData prop is output to the prop table...
I know Flow is hateful but i'm stuck with it, anyone else come across this problem?
The text was updated successfully, but these errors were encountered:
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!
I'm using `
"@storybook/preset-create-react-app": "^3.0.1"
"@storybook/addon-docs": "^5.3.19"
"flow-bin": "^0.109.0"
The prop table is populated with my prop types / descriptions but ONLY if a
type
is declared in the same file as the component.This works:
But because
widgetPropsT
is common i'd like to keep it in a common place eg:But when i do this only the
graphData
prop is output to the prop table...I know Flow is hateful but i'm stuck with it, anyone else come across this problem?
The text was updated successfully, but these errors were encountered: