UNPKG

@fgnass/decap-cms-widget-text

Version:

Widget for editing multiline plain string values in Decap CMS.

27 lines (26 loc) 1.12 kB
export default class TextControl extends React.Component<any, any, any> { static propTypes: { onChange: PropTypes.Validator<(...args: any[]) => any>; forID: PropTypes.Requireable<string>; value: PropTypes.Requireable<PropTypes.ReactNodeLike>; classNameWrapper: PropTypes.Validator<string>; setActiveStyle: PropTypes.Validator<(...args: any[]) => any>; setInactiveStyle: PropTypes.Validator<(...args: any[]) => any>; }; static defaultProps: { value: string; }; constructor(props: any); constructor(props: any, context: any); /** * Always update to ensure `react-textarea-autosize` properly calculates * height. Certain situations, such as this widget being nested in a list * item that gets rearranged, can leave the textarea in a minimal height * state. Always updating this particular widget should generally be low cost, * but this should be optimized in the future. */ shouldComponentUpdate(): boolean; render(): React.JSX.Element; } import React from 'react'; import PropTypes from 'prop-types';