1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

migrate from react-icons to @meronex/icons for better tree shaking

This commit is contained in:
checktheroads
2020-09-28 11:59:36 -07:00
parent 46e7dc40d0
commit 0ff845df2a
9 changed files with 21 additions and 37 deletions

View File

@@ -10,7 +10,7 @@ import {
Tooltip,
useColorMode
} from "@chakra-ui/core";
import { MdLastPage } from "react-icons/md";
import { MdLastPage } from "@meronex/icons/md";
import dayjs from "dayjs";
import relativeTimePlugin from "dayjs/plugin/relativeTime";
import utcPlugin from "dayjs/plugin/utc";

View File

@@ -1,8 +1,8 @@
import * as React from "react";
import { useState } from "react";
import { Flex, useColorMode } from "@chakra-ui/core";
import { FiCode } from "react-icons/fi";
import { GoLinkExternal } from "react-icons/go";
import { FiCode } from "@meronex/icons/fi";
import { GoLinkExternal } from "@meronex/icons/go";
import format from "string-format";
import { useConfig } from "app/context";
import { FooterButton } from "./FooterButton";

View File

@@ -1,21 +0,0 @@
import * as React from "react";
import { useTheme } from "@chakra-ui/core";
export const LightningBolt = ({ size = 4, color = "currentColor" }) => {
const theme = useTheme();
return (
<svg
width={theme.space[size]}
height={theme.space[size]}
viewBox="0 0 16 16"
fill={theme.colors[color]}
xmlns="http://www.w3.org/2000/svg"
>
<path
fillRule="evenodd"
d="M11.251.068a.5.5 0 0 1 .227.58L9.677 6.5H13a.5.5 0 0 1 .364.843l-8 8.5a.5.5 0 0 1-.842-.49L6.323 9.5H3a.5.5 0 0 1-.364-.843l8-8.5a.5.5 0 0 1 .615-.09z"
clipRule="evenodd"
/>
</svg>
);
};

View File

@@ -1,6 +1,6 @@
import * as React from "react";
import { Button } from "@chakra-ui/core";
import { FiChevronLeft } from "react-icons/fi";
import { FiChevronLeft } from "@meronex/icons/fi";
export const ResetButton = React.forwardRef(
({ isSubmitting, onClick }, ref) => (

View File

@@ -15,6 +15,7 @@ import {
useColorMode,
useTheme
} from "@chakra-ui/core";
import { BsLightningFill } from "@meronex/icons/bs";
import styled from "@emotion/styled";
import useAxios from "axios-hooks";
import strReplace from "react-string-replace";
@@ -25,7 +26,6 @@ import {
BGPTable,
CacheTimeout,
CopyButton,
LightningBolt,
RequeryButton,
ResultHeader,
TextOutput
@@ -266,7 +266,7 @@ export const Result = forwardRef(
placement="top"
>
<Box ml={1} display={data?.cached ? "block" : "none"}>
<LightningBolt color={color[colorMode]} />
<BsLightningFill color={color[colorMode]} />
</Box>
</Tooltip>
{isSm && (

View File

@@ -7,7 +7,7 @@ import {
useColorMode,
useTheme
} from "@chakra-ui/core";
import { FiSearch } from "react-icons/fi";
import { FiSearch } from "@meronex/icons/fi";
import { opposingColor } from "app/util";
const btnProps = {

View File

@@ -15,7 +15,6 @@ export * from "./HelpModal";
export * from "./HyperglassForm";
export * from "./Label";
export * from "./Layout";
export * from "./LightningBolt";
export * from "./Loading";
export * from "./LookingGlass";
export * from "./Markdown";