react-icons/fi#FiGrid TypeScript Examples

The following examples show how to use react-icons/fi#FiGrid. 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: ViewDisplayOptions.tsx    From game-store-monorepo-app with MIT License 6 votes vote down vote up
ViewDisplayOptions: React.FC<ViewDisplayOptionsProps> = ({ viewType, onViewTypeChange }) => {
  return (
    <div className="grid grid-cols-2 gap-2 items-center mb-5 overflow-y-hidden">
      <div>Display options:</div>
      <div>
        <ButtonGroup isFullWidth value={viewType} onChange={onViewTypeChange}>
          <ButtonGroup.Item value="Grid" className="w-1/2" size="small">
            <FiGrid size={16} />
          </ButtonGroup.Item>
          <ButtonGroup.Item value="List" className="w-1/2" size="small">
            <BsViewList size={16} />
          </ButtonGroup.Item>
        </ButtonGroup>
      </div>
    </div>
  );
}
Example #2
Source File: App.tsx    From clarity with Apache License 2.0 5 votes vote down vote up
SideMenuItems: (MenuItem | GroupedMenuItem)[] = [
  new MenuItem(
    Pages.Accounts,
    'Accounts',
    <IoMdKey fontSize={SideMenuIconSize} />
  ),
  new MenuItem(
    Pages.Faucet,
    'Faucet',
    <IoIosWater fontSize={SideMenuIconSize} />,
    false,
    FaucetAsterix
  ),
  new MenuItem(
    Pages.DeployContracts,
    'Deploy Contract',
    <IoMdRocket fontSize={SideMenuIconSize} />
  ),
  // new MenuItem(
  //   Pages.Explorer,
  //   'Explorer',
  //   <FaMapMarkedAlt fontSize={SideMenuIconSize} />
  // ),
  new MenuItem(Pages.Blocks, 'Blocks', <FiGrid fontSize={SideMenuIconSize} />),
  new MenuItem(
    Pages.Deploys,
    'Deploys',
    <FaListUl fontSize={SideMenuIconSize} />
  ),
  new MenuItem(
    Pages.Search,
    'Search',
    <FaSearch fontSize={SideMenuIconSize} />
  ),
  new MenuItem(
    Pages.Validators,
    'Validators',
    <FaUsers fontSize={SideMenuIconSize} />
  ),
  new MenuItem(
    Pages.ConnectedPeers,
    'Connected Peers',
    <FaNetworkWired fontSize={SideMenuIconSize} />
  )
  // new GroupedMenuItem(
  //   'clarityContracts',
  //   'Contracts',
  //   <FaFileContract fontSize={SideMenuIconSize} />,
  //   [new MenuItem(Pages.Vesting, 'Vesting')]
  // )
]
Example #3
Source File: AddButtons.tsx    From tobira with Apache License 2.0 5 votes vote down vote up
AddButtons: React.FC<Props> = ({ index, realm }) => {
    const { t } = useTranslation();

    const { id: realmId } = useFragment(graphql`
        fragment AddButtonsRealmData on Realm {
            id
        }
    `, realm);

    const env = useRelayEnvironment();

    const addBlock = (
        type: string,
        prepareBlock?: (store: RecordSourceProxy, block: RecordProxy) => void,
    ) => {
        commitLocalUpdate(env, store => {
            const realm = store.get(realmId) ?? bug("could not find realm");

            const blocks = [
                ...realm.getLinkedRecords("blocks") ?? bug("realm does not have blocks"),
            ];

            const id = "clNEWBLOCK";
            const block = store.create(id, `${type}Block`);
            prepareBlock?.(store, block);
            block.setValue(true, "editMode");
            block.setValue(id, "id");

            blocks.splice(index, 0, block);

            realm.setLinkedRecords(blocks, "blocks");
        });
    };

    return <ButtonGroup css={{ alignSelf: "center" }}>
        <span
            title={t("manage.realm.content.add")}
            css={{
                color: "white",
                backgroundColor: "var(--grey20)",
            }}
        >
            <FiPlus />
        </span>
        <Button title={t("manage.realm.content.add-title")} onClick={() => addBlock("Title")}>
            <FiType />
        </Button>
        <Button title={t("manage.realm.content.add-text")} onClick={() => addBlock("Text")}>
            <FiAlignLeft />
        </Button>
        <Button
            title={t("manage.realm.content.add-series")}
            onClick={() => addBlock("Series", (_store, block) => {
                block.setValue("NEW_TO_OLD", "order");
                block.setValue(true, "showTitle");
            })}
        >
            <FiGrid />
        </Button>
        <Button
            title={t("manage.realm.content.add-video")}
            onClick={() => addBlock("Video", (_store, block) => {
                block.setValue(true, "showTitle");
            })}
        >
            <FiFilm />
        </Button>
    </ButtonGroup>;
}
Example #4
Source File: App.tsx    From casper-clarity with Apache License 2.0 5 votes vote down vote up
SideMenuItems: (MenuItem | GroupedMenuItem)[] = [
  new MenuItem(
    Pages.Accounts,
    'Accounts',
    <IoMdKey fontSize={SideMenuIconSize} />
  ),
  faucetMenuItem,
  new MenuItem(
    Pages.DeployContracts,
    'Deploy Contract',
    <IoMdRocket fontSize={SideMenuIconSize} />
  ),
  // new MenuItem(
  //   Pages.Explorer,
  //   'Explorer',
  //   <FaMapMarkedAlt fontSize={SideMenuIconSize} />
  // ),
  new MenuItem(Pages.Blocks, 'Blocks', <FiGrid fontSize={SideMenuIconSize} />),
  new MenuItem(
    Pages.Deploys,
    'Deploys',
    <FaListUl fontSize={SideMenuIconSize} />
  ),
  new MenuItem(
    Pages.Search,
    'Search',
    <FaSearch fontSize={SideMenuIconSize} />
  ),
  new MenuItem(
    Pages.Validators,
    'Validators',
    <FaUsers fontSize={SideMenuIconSize} />
  ),
  new MenuItem(
    Pages.ConnectedPeers,
    'Connected Peers',
    <FaNetworkWired fontSize={SideMenuIconSize} />
  )
  // new GroupedMenuItem(
  //   'clarityContracts',
  //   'Contracts',
  //   <FaFileContract fontSize={SideMenuIconSize} />,
  //   [new MenuItem(Pages.Vesting, 'Vesting')]
  // )
]