defaultProps
@elastic/charts • Exports
@elastic/charts / SmallMultiples / defaultProps
Variable: defaultProps?
defaultProps?:
undefined
|Partial
<SFProps
<SmallMultiplesSpec
,"chartType"
|"specType"
,"id"
,SFOptionalKeys
<SmallMultiplesSpec
,"chartType"
|"specType"
,"id"
>,never
>>
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