Imported interfaces not displaying in Prop tables
See original GitHub issueWhen extending an interface with another imported from another file, the prop table doesn’t render any of the imported properties. I assume this would also apply when using the Type
’s too.
eg:
// Foo.tsx
export interface Foo {
bar?: string
}
// Component.tsx
import { Foo } from './Foo.tsx'
interface Props extends React.ButtonHTMLAttributes<HTMLButtonElement>, Foo {
disabled?: boolean
}
const Component = ( { disabled = false, children }: Props) => <button disabled={disabled}>{children}</button>
☝🏼Prop table only outputs the disabled prop (ignores bar
)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Could not find my typescript property under the interface folder ...
ts) in the book.component.ts. then it's working fine.but I want to keep this interface(book.ts) outside my component.ts file. how i ...
Read more >Use Interface Props in Functional Components ... - Pluralsight
This guide will cover how to strongly type the props in a function component with the TypeScript interface. Use Case. Consider a situation...
Read more >Entering Interface Table Load IDs for Import Profiles
When importing dimensions and members from interface tables, all dimensions and members are automatically imported. However, there is a i_Load_ID column in ...
Read more >Import and Export Architecture Models - MATLAB & Simulink
You can extend these tables and add information like applied stereotypes, property values, linked model references, variant components, interfaces, ...
Read more >Real Magic: Building Custom Interface Tables with Cameo ...
However, these built-in tables are often not flexible enough or do ... derived property Updated table with the two new columns showing the ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have the same issue, and #9556 is not the same as the issue described here.
@sami616 wrote
So it did render the base properties, and not like in 9556 described, nothing. I am NOT using the default import syntax
React.FunctionComponent
but the named export syntaxFunctionComponent
and I try to extend another properties interface from another file (named export), and it ignores these properies:Output in Storybook:
So my properties from other file are ignored.
It’s not about any imported type, but rather it’s about using types stemming from an import of a default export.
https://github.com/storybookjs/storybook/issues/9556