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

JS style updates [skip ci]

This commit is contained in:
checktheroads
2020-10-07 09:41:58 -07:00
parent 3743f1a4c5
commit 5e61e097a2
73 changed files with 995 additions and 1385 deletions

View File

@@ -1,7 +1,7 @@
import * as React from "react";
import { Button, Icon, Tooltip, useClipboard } from "@chakra-ui/core";
import * as React from 'react';
import { Button, Icon, Tooltip, useClipboard } from '@chakra-ui/core';
export const CopyButton = ({ bg = "secondary", copyValue, ...props }) => {
export const CopyButton = ({ bg = 'secondary', copyValue, ...props }) => {
const { onCopy, hasCopied } = useClipboard(copyValue);
return (
<Tooltip hasArrow label="Copy Output" placement="top">
@@ -12,13 +12,8 @@ export const CopyButton = ({ bg = "secondary", copyValue, ...props }) => {
zIndex="dropdown"
onClick={onCopy}
mx={1}
{...props}
>
{hasCopied ? (
<Icon name="check" size="16px" />
) : (
<Icon name="copy" size="16px" />
)}
{...props}>
{hasCopied ? <Icon name="check" size="16px" /> : <Icon name="copy" size="16px" />}
</Button>
</Tooltip>
);