@ant-design/icons#MinusCircleTwoTone JavaScript Examples

The following examples show how to use @ant-design/icons#MinusCircleTwoTone. 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: function.js    From ant-simple-pro with MIT License 6 votes vote down vote up
expandIcon = ({ expanded, onExpand, record },flag) =>{
  const style = {
    textAlign: 'center',
    position: 'absolute',
    top: '65%',
    transform: 'translateY(-50%)',
    height: '40px',
    width:'40px'
  }
  return (
    record[flag] && record[flag].length ? expanded ? (
    <div style={style}><MinusCircleTwoTone onClick={e => onExpand(record, e)} /></div>
  ) : (
    <div style={style}><PlusCircleTwoTone onClick={e => onExpand(record, e)} /></div>
  ) : null)
}
Example #2
Source File: ListTodo.js    From Peppermint with GNU General Public License v3.0 5 votes vote down vote up
ListTodo = () => {
  const { todos, getTodos, deleteTodo, allDone, markDone, markUndone } = useContext(
    GlobalContext
  );

  useEffect(() => {
    getTodos();
    // eslint-disable-next-line
  }, []);

  return (
    <div>
      <Button style={{ marginTop: 10 }} onClick={allDone}>
        Mark All Done
      </Button>
      <Divider orientation="left" style={{ width: "auto" }}></Divider>
      {todos ? (
        todos.map((todo) => {
          return (
            <div className="todo-list" key={todo._id}>
              <ul key={todo._id}>
                <li style={{ marginLeft: -35 }} key={todo._id}>
                  <span className={todo.done ? "done" : ""}>{todo.text}</span>
                  <Tooltip placement="right" title="Delete">
                    <Button
                      onClick={() => deleteTodo(todo._id)}
                      style={{ float: "right" }}
                    >
                      <DeleteTwoTone twoToneColor="#FF0000" />
                    </Button>
                  </Tooltip>
                  {todo.done ? (
                    <Tooltip placement="left" title="Unmark as done">
                      <Button
                        onClick={() => markUndone(todo._id)}
                        style={{ float: "right", marginRight: 5 }}
                      >
                        <MinusCircleTwoTone />
                      </Button>
                    </Tooltip>
                  ) : (
                    <Tooltip placement="left" title="Mark as done">
                      <Button
                        onClick={() => markDone(todo._id)}
                        style={{ float: "right", marginRight: 5 }}
                      >
                        <CheckCircleTwoTone twoToneColor="#52c41a" />
                      </Button>
                    </Tooltip>
                  )}
                </li>
              </ul>
            </div>
          );
        })
      ) : (
        <p></p>
      )}
    </div>
  );
}