@ant-design/icons#InsertRowAboveOutlined JavaScript Examples

The following examples show how to use @ant-design/icons#InsertRowAboveOutlined. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ProjectWorkspace.jsx    From node-project-manager with Apache License 2.0 4 votes vote down vote up
ProjectWorkspace = ({ project,projects,selectedProject,createProject }) => {

  const [ showNewProject, setShowNewProject ] = useState(true);
  const [ newProject, setNewProject ] = useState({name:"",user:""});

  const addProject = async (values) => {
    const result = await Http.post(values,'/api/projects/createProject');
    if(result){
      console.log(result);
      createProject(result);
      selectedProject(result.id);
      ///TODO
      //createUser(result);
    }   
}  

  useEffect(()=> {
    setShowNewProject(true);
  },[project]);


  return (

    (project.id === "add") ?    <Modal
    visible={showNewProject}
    title="Crear Proyecto"
    destroyOnClose={true}
    onCancel={()=> {setShowNewProject(!showNewProject);selectedProject(projects[1].id)}}
    onOk={()=>{addProject(newProject)}}
    okText="Nuevo Proyecto"
    cancelText="Cancelar"
          >
      <Form>

      <Form.Item
        label="Nombre del Proyecto"
        name="name"
          rules={[{ required: true, message: 'Pon un nombre al proyecto' }]}
        >
        <Input onChange={(e)=>{
          setNewProject({...newProject,[e.target.id]:e.target.value})          
          }}/>
      </Form.Item>

      <Form.Item
        label="Creador como alumno del proyecto"
        name="user"
          rules={[{ message: 'Usuario de la sesiĆ³n asignado al proyecto' }]}
        >
        <Checkbox onChange={(e)=>{setNewProject({...newProject,[e.target.id]:(e.target.checked)?true:false})}}/>
      </Form.Item>
  
      </Form>
    </Modal>
  : 
    <Tabs defaultActiveKey="1" className="projectWorkspace">
      <TabPane
        tab={
          <span>
            <BarsOutlined />
            Detalles
          </span>
        }
        key="1"
      >
        <ProjectDescription/>
      </TabPane>
      <TabPane
        tab={
          <span>
            <InsertRowAboveOutlined />
            Kanban
          </span>
        }
        key="2"
      >
        <Kanban/>
      </TabPane>
      <TabPane
        tab={
          <span>
            <StarOutlined />
            Calificaciones
          </span>
        }
        key="3"
      >
        Notas de Angel
        Notas de Diego
        Notas de Manuel Maria
      </TabPane>
    </Tabs>
  );
}