Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions src/core/components/copy-to-clipboard-btn.jsx

This file was deleted.

29 changes: 29 additions & 0 deletions src/core/components/copy-to-clipboard-btn.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* @prettier
*/
import React from "react"
import { CopyToClipboard } from "react-copy-to-clipboard"

const COPY_PATH_LABEL = "Copy path to clipboard"

interface Props {
textToCopy: string
}

const CopyToClipboardBtn = ({ textToCopy }: Props) => (
<div
className="view-line-link copy-to-clipboard"
title={COPY_PATH_LABEL}
aria-label={COPY_PATH_LABEL}
>
<CopyToClipboard text={textToCopy}>
<button
aria-label={COPY_PATH_LABEL}
title={COPY_PATH_LABEL}
type="button"
/>
</CopyToClipboard>
</div>
)

export default CopyToClipboardBtn
34 changes: 0 additions & 34 deletions src/core/plugins/icons/components/copy.jsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/core/plugins/icons/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import ArrowUpIcon from "./components/arrow-up"
import ArrowDownIcon from "./components/arrow-down"
import ArrowIcon from "./components/arrow"
import CloseIcon from "./components/close"
import CopyIcon from "./components/copy"
import LockIcon from "./components/lock"
import UnlockIcon from "./components/unlock"

Expand All @@ -15,7 +14,6 @@ const IconsPlugin = () => ({
ArrowDownIcon,
ArrowIcon,
CloseIcon,
CopyIcon,
LockIcon,
UnlockIcon,
},
Expand Down
1 change: 1 addition & 0 deletions src/style/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ button {
height: 25px;
background: url("data:image/svg+xml, <svg xmlns='http://www.w3.org/2000/svg' width='16' height='15' aria-hidden='true'><g transform='translate(2, -1)'><path fill='#ffffff' fill-rule='evenodd' d='M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z'></path></g></svg>")
center center no-repeat;
padding: 0;

@media (forced-colors: active) {
forced-color-adjust: none;
Expand Down