mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-09-16 20:05:31 -04:00
octicons weren't being tree-shaken -- import SVGs manually for now
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
top: 0;
|
||||
right: 0;
|
||||
padding: 0.75em;
|
||||
line-height: 1;
|
||||
color: var(--text);
|
||||
background-color: var(--background-inner);
|
||||
border: 1px solid var(--kinda-light);
|
||||
@@ -15,6 +16,7 @@
|
||||
.octicon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
|
||||
.octicon-check {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { useState, useEffect } from "react";
|
||||
import copy from "copy-to-clipboard";
|
||||
import trimNewlines from "trim-newlines";
|
||||
import { CopyIcon, CheckIcon } from "@primer/octicons-react";
|
||||
import { CopyOcticon, CheckOcticon } from "../icons/octicons";
|
||||
|
||||
import styles from "./CopyButton.module.scss";
|
||||
|
||||
@@ -48,9 +48,9 @@ export default function CopyButton({ content, timeout = 2000 }: Props) {
|
||||
disabled={copied}
|
||||
>
|
||||
{copied ? (
|
||||
<CheckIcon size={16} className={`${styles.octicon} ${styles["octicon-check"]}`} />
|
||||
<CheckOcticon fill="currentColor" className={`${styles.octicon} ${styles["octicon-check"]}`} />
|
||||
) : (
|
||||
<CopyIcon size={16} className={styles.octicon} />
|
||||
<CopyOcticon fill="currentColor" className={styles.octicon} />
|
||||
)}
|
||||
</button>
|
||||
);
|
||||
|
Reference in New Issue
Block a user