Skip to content

[Docs] Allow passing a prop type or interface directly to the props option in the docs #1688

@cchaos

Description

@cchaos

I have a shared TS interface definition that I used throughout a component and it's sub-components. I'd like to display this interface and any prop comments in the props table.

An example of this type of definition is

export type EuiPopoverPosition = 'top' | 'right' | 'bottom' | 'left';

which lives in it's own file.

I'd like to be able to do something like

import { EuiPopoverPosition } from '../../.....'

{
  props: { EuiPopoverPosition }
}

in the docs.

Metadata

Metadata

Labels

documentationIssues or PRs that only affect documentation - will not need changelog entries

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions