mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-10 19:57:17 +03:00
Add missing label (#12160)
This commit is contained in:
parent
fcedcd54a8
commit
3aa61e615f
|
@ -14,7 +14,7 @@ export function copyToClipboard(ref, callback) {
|
|||
}
|
||||
}
|
||||
|
||||
export default function CopyInput({ text, prefix }) {
|
||||
export default function CopyInput({ text, description, prefix }) {
|
||||
const isClient = typeof window !== 'undefined'
|
||||
const [supportsCopy, setSupportsCopy] = useState(false)
|
||||
|
||||
|
@ -41,6 +41,7 @@ export default function CopyInput({ text, prefix }) {
|
|||
defaultValue={text}
|
||||
rows={1}
|
||||
onClick={selectText}
|
||||
aria-label={description}
|
||||
/>
|
||||
{supportsCopy && (
|
||||
<button title="Copy to clipboard" onClick={onClick}>
|
||||
|
|
|
@ -29,7 +29,11 @@ export default function Project({
|
|||
return (
|
||||
<Infobox title={header} emoji="🪐">
|
||||
{children}
|
||||
<CopyInput text={text} prefix="$" />
|
||||
<CopyInput
|
||||
text={text}
|
||||
prefix="$"
|
||||
description="Example bash command to start with an end-to-end template"
|
||||
/>
|
||||
</Infobox>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user