mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 19:19:57 +08:00
demo: update form demo when layout === inline (#42476)
This commit is contained in:
parent
ecc384e8b6
commit
9caba0919b
@ -1,5 +1,5 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Button, Form, Input, Radio } from 'antd';
|
||||
import React, { useState } from 'react';
|
||||
|
||||
type LayoutType = Parameters<typeof Form>[0]['layout'];
|
||||
|
||||
@ -24,7 +24,7 @@ const App: React.FC = () => {
|
||||
form={form}
|
||||
initialValues={{ layout: formLayout }}
|
||||
onValuesChange={onFormLayoutChange}
|
||||
style={{ maxWidth: 600 }}
|
||||
style={{ maxWidth: formLayout === 'inline' ? 'none' : 600 }}
|
||||
>
|
||||
<Form.Item label="Form Layout" name="layout">
|
||||
<Radio.Group value={formLayout}>
|
||||
|
Loading…
Reference in New Issue
Block a user