From ea685a44292ab75e9f9e1cb0fd1a26ab064a5b77 Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Thu, 19 Oct 2023 16:34:56 -0700 Subject: [PATCH] Update @primer/react --- package-lock.json | 8 ++++---- package.json | 2 +- src/components/clipboard-copy.js | 35 -------------------------------- 3 files changed, 5 insertions(+), 40 deletions(-) delete mode 100644 src/components/clipboard-copy.js diff --git a/package-lock.json b/package-lock.json index 680f26890d6..a504225eec1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@mdx-js/mdx": "^2.3.0", "@mdx-js/react": "^2.3.0", "@primer/octicons-react": "^19.8.0", - "@primer/react": "^35.31.0", + "@primer/react": "^35.32.1", "babel-plugin-styled-components": "^2.1.4", "copy-to-clipboard": "^3.3.3", "deepmerge": "^4.3.1", @@ -8063,9 +8063,9 @@ "integrity": "sha512-ut010QMQT2YcQcn6gLHBC97YVN0ToR+7phxl+351hC94a7EgVR9GtwLOqopqU7el2w6iOrUndHBxDuUg1TBWhg==" }, "node_modules/@primer/react": { - "version": "35.32.0", - "resolved": "https://registry.npmjs.org/@primer/react/-/react-35.32.0.tgz", - "integrity": "sha512-DAYjIird6xzKDNWxX9331qRFiS6Jnmrtkha8r2sIzvbTIBcRXnm8dMi0B0tpHG5e57NhflYfd00z3dhvxxNFPQ==", + "version": "35.32.1", + "resolved": "https://registry.npmjs.org/@primer/react/-/react-35.32.1.tgz", + "integrity": "sha512-LwRPomdkU+cAXW68zWZHXlJ6me1WGR6XmUXY1FfAxpLIgvIwhAlSNNqPgvyo63brMh1QyD4G8a04mzrvd3Lbrg==", "dependencies": { "@github/combobox-nav": "^2.1.5", "@github/markdown-toolbar-element": "^2.1.0", diff --git a/package.json b/package.json index 427ee06e211..c8f596ce8c9 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "@mdx-js/mdx": "^2.3.0", "@mdx-js/react": "^2.3.0", "@primer/octicons-react": "^19.8.0", - "@primer/react": "^35.31.0", + "@primer/react": "^35.32.1", "babel-plugin-styled-components": "^2.1.4", "copy-to-clipboard": "^3.3.3", "deepmerge": "^4.3.1", diff --git a/src/components/clipboard-copy.js b/src/components/clipboard-copy.js deleted file mode 100644 index e6406303196..00000000000 --- a/src/components/clipboard-copy.js +++ /dev/null @@ -1,35 +0,0 @@ -import React from 'react' -import {Button, Octicon} from '@primer/react' -import {CheckIcon, CopyIcon} from '@primer/octicons-react' -import copy from 'copy-to-clipboard' -import {announce} from '../util/aria-live' - -function ClipboardCopy({value}) { - const [copied, setCopied] = React.useState(false) - - React.useEffect(() => { - const timeout = setTimeout(() => { - if (copied) { - setCopied(false) - } - }, 1000) - - return () => clearTimeout(timeout) - }, [copied]) - - return ( - - ) -} - -export default ClipboardCopy