defaultProps
@elastic/charts • Exports
@elastic/charts / Wordcloud / defaultProps
Variable: defaultProps?
defaultProps?:
undefined
|Partial
<SFProps
<WordcloudSpec
,"chartType"
|"specType"
,"data"
|"fontStyle"
|"fontWeight"
|"fontFamily"
|"padding"
|"minFontSize"
|"maxFontSize"
|"exponent"
|"startAngle"
|"endAngle"
|"angleCount"
|"spiral"
|"weightFn"
|"outOfRoomCallback"
,never
,"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