Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 3a8de9d

Browse files
form alignment buttons are changed
1 parent 08cd23a commit 3a8de9d

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

src/forms/todo/drawer.form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default function DrawerForm() {
1616
return (
1717
<>
1818
<Button type="primary" onClick={showDrawer}>
19-
Open
19+
Drawer Form
2020
</Button>
2121
<Drawer
2222
title="Add new Todo"

src/forms/todo/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export { default as DrawerForm } from './drawer.form';
2-
export { default as CreateForm } from './modal.form';
2+
export { default as ModalForm } from './modal.form';
33
export { TodoForm } from './todo.form';

src/forms/todo/modal.form.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useState } from 'react';
2-
import { Drawer, Modal, Button } from 'antd';
2+
import { Modal, Button } from 'antd';
33
import { TodoForm } from '../todo';
44

55
export default class App extends React.Component {
@@ -29,13 +29,14 @@ export default class App extends React.Component {
2929
return (
3030
<div>
3131
<Button type="primary" onClick={this.showModal}>
32-
Open Modal
32+
Modal Form
3333
</Button>
3434
<Modal
3535
title="Basic Modal"
3636
visible={this.state.visible}
3737
onOk={this.handleOk}
3838
onCancel={this.handleCancel}
39+
footer={null}
3940
>
4041
<TodoForm />
4142
</Modal>

src/pages/Todo.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
import React from 'react';
2-
import { CreateForm, DrawerForm, TodoForm } from '../forms/todo';
2+
import { Row, Col } from 'antd';
3+
import { ModalForm, DrawerForm } from '../forms/todo';
34
import { TodoList } from '../components/todo';
45

56
export default function Todo() {
67
return (
78
<div className="main-layout">
8-
<CreateForm />
9-
<DrawerForm />
10-
<TodoForm />
9+
<Row gutter={8}>
10+
<Col>
11+
<ModalForm />
12+
</Col>
13+
<Col>
14+
<DrawerForm />
15+
</Col>
16+
</Row>
1117
<TodoList />
1218
</div>
1319
);

0 commit comments

Comments
 (0)