2018-04-28new modal

new modal

import * as React from "react"
import { Modal } from "components"
import { Input, ButtonGroup, Button } from "components/controls"
import { connect } from "utils"

interface Props {
  title: string
}

interface State {
  name: string
}

type P = WithStyles & Props

const styles = {
  inputContainer: {
    boxSizing: "border-box",
    width: 487,
    padding: "30px 25px",
    borderBottom: "1px solid rgba(0,0,0,0.2)",
  },
  btnContainer: {
    padding: "20px 25px",
    display: "flex",
    justifyContent: "flex-end",
  },
}

class EditModal extends React.Component<P, State> {
  constructor(props: P) {
    super(props)
    this.state = {
      name: ""
    }
  }

  render() {
    const { classes } = this.props
    return (
      <Modal open title="New Directory">
        <div className={classes.inputContainer}>
          <Input label="Directory Name"/>
          <Input label="Directory Type"/>
        </div>
        <div className={classes.btnContainer}>
          <ButtonGroup>
            <Button>Cancel</Button>
            <Button>Save</Button>
          </ButtonGroup>
        </div>
      </Modal>
    )
  }
}

export default connect(EditModal, { styles })

parent component import it


屏幕快照 2018-04-28 11.35.53.png
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • Pathname lookup in Linux. This write-up is based on three...
    朔飞阅读 913评论 0 0
  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,884评论 0 10
  • 青云之上 是否也有一条大江 江中是否有一对金色的大鱼 它们是否永远在互相追逐 它们是否永不疲劳 是否会共游在天涯海...
    伍丁零阅读 172评论 0 3
  • 马建国 新年刚过,可囧事不断,前几天才《搭错车》,这不,又《投错医》了,唉! ...
    策马奔腾2阅读 323评论 2 2
  • 嘎嘎嘎,21天打卡完美收官,小有成就感,佩服自己的一路坚持,感谢大家的一路陪伴,感恩爱芮老师的辛苦付出。 相信,我...
    如意风筝阅读 241评论 1 1

友情链接更多精彩内容