Skip to content

Commit

Permalink
chore: update form demo
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Nov 5, 2021
1 parent ea52572 commit 5360722
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 38 deletions.
46 changes: 21 additions & 25 deletions components/form/__tests__/__snapshots__/demo.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8170,39 +8170,35 @@ exports[`renders ./components/form/demo/warning-only.md correctly 1`] = `
class="ant-form ant-form-vertical"
>
<div
style="overflow:hidden"
class="ant-row ant-form-item"
>
<div
class="ant-row ant-form-item"
class="ant-col ant-form-item-label"
>
<div
class="ant-col ant-form-item-label"
<label
class="ant-form-item-required"
for="url"
title="URL"
>
<label
class="ant-form-item-required"
for="url"
title="URL"
>
URL
</label>
</div>
URL
</label>
</div>
<div
class="ant-col ant-form-item-control"
>
<div
class="ant-col ant-form-item-control"
class="ant-form-item-control-input"
>
<div
class="ant-form-item-control-input"
class="ant-form-item-control-input-content"
>
<div
class="ant-form-item-control-input-content"
>
<input
class="ant-input"
id="url"
placeholder="input placeholder"
type="text"
value=""
/>
</div>
<input
class="ant-input"
id="url"
placeholder="input placeholder"
type="text"
value=""
/>
</div>
</div>
</div>
Expand Down
20 changes: 7 additions & 13 deletions components/form/demo/warning-only.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,13 @@ const Demo = () => {
onFinishFailed={onFinishFailed}
autoComplete="off"
>
<div style={{ overflow: 'hidden' }}>
<Form.Item
name="url"
label="URL"
rules={[
{ required: true },
{ type: 'url', warningOnly: true },
{ type: 'string', min: 6 },
]}
>
<Input placeholder="input placeholder" />
</Form.Item>
</div>
<Form.Item
name="url"
label="URL"
rules={[{ required: true }, { type: 'url', warningOnly: true }, { type: 'string', min: 6 }]}
>
<Input placeholder="input placeholder" />
</Form.Item>
<Form.Item>
<Space>
<Button type="primary" htmlType="submit">
Expand Down

0 comments on commit 5360722

Please sign in to comment.