mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-10 16:22:29 +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 isClient = typeof window !== 'undefined'
|
||||||
const [supportsCopy, setSupportsCopy] = useState(false)
|
const [supportsCopy, setSupportsCopy] = useState(false)
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@ export default function CopyInput({ text, prefix }) {
|
||||||
defaultValue={text}
|
defaultValue={text}
|
||||||
rows={1}
|
rows={1}
|
||||||
onClick={selectText}
|
onClick={selectText}
|
||||||
|
aria-label={description}
|
||||||
/>
|
/>
|
||||||
{supportsCopy && (
|
{supportsCopy && (
|
||||||
<button title="Copy to clipboard" onClick={onClick}>
|
<button title="Copy to clipboard" onClick={onClick}>
|
||||||
|
|
|
@ -29,7 +29,11 @@ export default function Project({
|
||||||
return (
|
return (
|
||||||
<Infobox title={header} emoji="🪐">
|
<Infobox title={header} emoji="🪐">
|
||||||
{children}
|
{children}
|
||||||
<CopyInput text={text} prefix="$" />
|
<CopyInput
|
||||||
|
text={text}
|
||||||
|
prefix="$"
|
||||||
|
description="Example bash command to start with an end-to-end template"
|
||||||
|
/>
|
||||||
</Infobox>
|
</Infobox>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user