Make a card component as drawer Ant Design

北城余情 提交于 2020-06-17 01:51:08

问题


I need a small help.

I am using Ant Design drawer, I want a particular card component as slides from the edge of the screen. I have searched regarding this But didn't get any solution. Please check the Sandbox and in that the card which is in left should slide from left. Please help me out. An image is attached for better understanding purposes.

SandBox link: https://codesandbox.io/s/musing-leaf-0jj6p?file=/index.js

Link for Image: https://www.awesomescreenshot.com/image/4897738/d3c8150967f9b7ee17c8881562727b95

Thank you.


回答1:


you can do with custom css like this .

in your react code do like this .

 <Drawer
      className="drawer-height"
        placement="left"
        width={250}
        closable={false}
        onClose={onClose}
        visible={visible}
      >

and add this in your css file .

.drawer-height {
  height  : 200px;
}

Hope this'll help !



来源:https://stackoverflow.com/questions/62301807/make-a-card-component-as-drawer-ant-design

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!