react-icons/md#MdOutlineDone TypeScript Examples

The following examples show how to use react-icons/md#MdOutlineDone. 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: Mode.tsx    From Notepad with MIT License 6 votes vote down vote up
function Mode() {
  const [showMode, setShowMode] = useState(false);

  const { drawMode, setDrawMode } = useContext(DrawModeContext);

  return (
    <div className="dropdown">
      <button
        className="btn"
        onClick={() => setShowMode(!showMode)}
        onBlur={() => setTimeout(() => setShowMode(false), 150)}
      >
        Mode
      </button>
      <div
        className="dropdown-content"
        style={{ display: showMode ? "block" : "none" }}
      >
        <button className="menu-btn btn" onClick={() => setDrawMode(!drawMode)}>
          Draw Mode <kbd>{drawMode && <MdOutlineDone />}</kbd>
        </button>
      </div>
    </div>
  );
}
Example #2
Source File: View.tsx    From Notepad with MIT License 6 votes vote down vote up
function View() {
  const [showView, setShowView] = useState(false);

  return (
    <div className="dropdown">
      <button
        className="btn"
        onClick={() => setShowView(!showView)}
        onBlur={() => setTimeout(() => setShowView(false), 150)}
      >
        View
      </button>
      <div
        className="dropdown-content"
        style={{ display: showView ? "block" : "none" }}
      >
        <button className="menu-btn btn" onClick={toggleFullscreen}>
          Fullscreen <p>{screenfull.isFullscreen && <MdOutlineDone />}</p>
        </button>
        <button className="menu-btn btn" onClick={toggleTheme}>
          Dark Mode <p>{isDarkTheme() && <MdOutlineDone />}</p>
        </button>
      </div>
    </div>
  );
}