@aliretail/react-materials-components
Version:
52 lines (48 loc) • 1.21 kB
Markdown
title: TextArea
order: 30
```jsx
import React from 'react';
import ReactDOM from 'react-dom';
import { FormComponents } from '@aliretail/react-materials-components';
const { TextArea, SchemaForm, SchemaMarkupField: Field, createFormActions } = FormComponents;
const App = () => {
return (
<SchemaForm
components={{
TextArea,
}}
defaultValue={{
text: '233',
text2: '12313',
readOnly:
'dsaffdsaadsfffffffasdfdsdafsdfsadfasdfasfdsjhfdsakjlfdsakjldfaslkjfdsakljdfsajkldfsaklj;dfsajkl;dfsaklj;fdasdfjkdfasjkl;dfaskjldfsaklj;dfasjkl;dfasjkl;dfaslkjdafslkj;afdskjl;dfs',
}}
>
<Field
required
title="Text"
name="text"
readOnly
x-component="TextArea"
x-component-props={{
placeholder: 'input',
}}
/>
<Field
required
title="Text2"
name="text2"
writeOnly
x-component="TextArea"
x-component-props={{
placeholder: 'input',
}}
/>
<Field readOnly title="readOnly" name="readOnly" x-component="TextArea" />
</SchemaForm>
);
};
ReactDOM.render(<App />, mountNode);
```