How do you put padding/margin around the content of the drawer in antd?

Viewed 205

It is showing up like this for me.

How do I make the content have padding, without having to write custom CSS and use the className property? My drawer essentially looks like this:

<Drawer
  closable
  visible
  width={400}
  placement="right"
  title="Create"
  >
  <Form
    layout="vertical"
  >
    <Form.Item name="name" label="Name">
      <Input />
    </Form.Item>
  </Form>
</Drawer>
1 Answers

You can use the antd Grid to wrap your drawer content inside a row-col wrapper. To define the padding you can use the gutter property of row.

There is already and example for that on the antd drawer demo page.

Related