-
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #352 from kreneskyp/svg_icons
SVG Icons
- Loading branch information
Showing
9 changed files
with
103 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from "react"; | ||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | ||
import { faMessage, faClock } from "@fortawesome/free-solid-svg-icons"; | ||
import { useColorMode } from "@chakra-ui/color-mode"; | ||
import { Box } from "@chakra-ui/layout"; | ||
import { StackableIcon } from "icons/StackableIcon"; | ||
import { IndicatorIcon } from "icons/IndicatorIcon"; | ||
|
||
const ChatHistoryIcon = () => { | ||
const { colorMode } = useColorMode(); | ||
const iconColor = colorMode === "light" ? "gray.200" : "black"; | ||
|
||
return ( | ||
<StackableIcon> | ||
<FontAwesomeIcon icon={faMessage} size={"sm"} /> | ||
<IndicatorIcon indicatorSize={11}> | ||
<FontAwesomeIcon icon={faClock} /> | ||
</IndicatorIcon> | ||
</StackableIcon> | ||
); | ||
}; | ||
|
||
export default ChatHistoryIcon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from "react"; | ||
import SVGIcon from "icons/SVGIcon"; | ||
|
||
export const LoopIcon = ({ ...props }) => { | ||
return ( | ||
<SVGIcon {...props}> | ||
<path | ||
d="m82.133 14.266v16.668h17.199c13.465 0 24.535 11.066 24.535 24.535v33.734c0 13.465-11.066 24.535-24.535 24.535h-70.668c-13.465-0.003906-24.531-11.07-24.531-24.539v-33.734c0-13.465 11.066-24.535 24.535-24.535h13.734v14.934l-13.734 0.003907c-5.1992 0-9.6016 4.2656-9.6016 9.6016v33.734c0 5.1992 4.2656 9.6016 9.6016 9.6016h70.668c5.1992 0 9.6016-4.2656 9.6016-9.6016l-0.003906-33.738c0-5.1992-4.2656-9.6016-9.6016-9.6016l-17.199 0.003907v16.801l-28.668-24.133z" | ||
fill-rule="evenodd" | ||
/> | ||
</SVGIcon> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from "react"; | ||
import SVGIcon from "icons/SVGIcon"; | ||
|
||
export const MergeIcon = ({ ...props }) => { | ||
return ( | ||
<SVGIcon transform="rotate(270deg)" {...props}> | ||
<path | ||
d="M 34.451172 14.640625 L 34.451172 51.921875 C 34.451172 65.156275 45.371861 76.027344 58.611328 76.027344 L 74.826172 76.027344 L 74.826172 122.48047 L 51.542969 122.48047 C 52.548279 123.66844 73.896271 148.94757 85.302734 162.36914 C 96.699189 148.94727 118.11464 123.6679 119.125 122.48047 L 95.841797 122.48047 L 95.841797 76.027344 L 112.05469 76.027344 C 125.28909 76.027344 136.2168 65.156142 136.2168 51.921875 L 136.2168 14.640625 L 120.48047 14.640625 L 120.48047 51.921875 C 120.48047 56.713608 116.84629 60.296875 112.05469 60.296875 L 58.617188 60.296875 C 53.825454 60.296875 50.189453 56.713475 50.189453 51.921875 L 50.189453 14.640625 L 34.451172 14.640625 z " | ||
transform="scale(0.75)" | ||
/> | ||
</SVGIcon> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from "react"; | ||
import { Box, useToken } from "@chakra-ui/react"; | ||
|
||
export const SVGIcon = ({ color, bg, children, svgProps, ...props }) => { | ||
const colorToken = useToken("colors", color || "white"); | ||
|
||
return ( | ||
<Box display={"inline-block"} m={0} p={0} {...props}> | ||
<svg | ||
width="1.2em" | ||
height="1.2em" | ||
viewBox="0 0 128 128" | ||
fill={colorToken} | ||
{...(svgProps || {})} | ||
> | ||
{children} | ||
</svg> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default SVGIcon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from "react"; | ||
import SVGIcon from "icons/SVGIcon"; | ||
|
||
export const SplitIcon = ({ ...props }) => { | ||
return ( | ||
<SVGIcon transform="rotate(90deg)" {...props}> | ||
<path d="m31.719 8.6016c-8.5547 10.066-24.566 29.027-25.32 29.918h19.441v27.961c0 9.9258 8.1914 18.078 18.121 18.078h12.16v34.84h15.762v-34.84h12.16c9.9258 0 18.121-8.1523 18.121-18.078v-27.961h19.441c-0.75781-0.89062-16.809-19.852-25.367-29.918-8.5547 10.066-24.566 29.027-25.316 29.918h19.441v27.961c0 3.5938-2.7266 6.2812-6.3203 6.2812h-40.078c-3.5938 0-6.3203-2.6875-6.3203-6.2812v-27.961h19.441c-0.75781-0.89062-16.82-19.852-25.367-29.918z" /> | ||
</SVGIcon> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters