defaultProps
@elastic/charts • Exports
@elastic/charts / Axis / defaultProps
Variable: defaultProps?
defaultProps?:
undefined
|Partial
<SFProps
<AxisSpec
,"chartType"
|"specType"
,"position"
|"hide"
|"groupId"
|"showOverlappingTicks"
|"showOverlappingLabels"
|"timeAxisLayerCount"
,SFOptionalKeys
<AxisSpec
,"chartType"
|"specType"
,"position"
|"hide"
|"groupId"
|"showOverlappingTicks"
|"showOverlappingLabels"
|"timeAxisLayerCount"
>,"id"
>>
Used to define default values for the props accepted by the component.
See
Example
type Props = { name?: string }
const MyComponent: FC<Props> = (props) => {
return <div>{props.name}</div>
}
MyComponent.defaultProps = {
name: 'John Doe'
}
Deprecated
Use values for destructuring assignments instead.
Source
node_modules/@types/react/index.d.ts:1179
Generated using typedoc-plugin-markdown and TypeDoc