Copy button text → icon
- Converts to icon button - Adds accessibility label field
This commit is contained in:
parent
1a63c31b71
commit
228e2187e3
@ -40,12 +40,15 @@ export class CopyButton extends LitElement {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return html`
|
return html`
|
||||||
<sl-button
|
<sl-tooltip content=${this.isCopied ? msg("Copied to clipboard!") : msg("Copy")}>
|
||||||
size="small"
|
<sl-icon-button
|
||||||
@click=${this.onClick}
|
size="small"
|
||||||
?disabled=${!this.value && !this.getValue}
|
name=${this.isCopied ? "check-lg" : "files"}
|
||||||
>${this.isCopied ? msg("Copied") : msg("Copy")}</sl-button
|
label=${msg("Copy to clipboard")}
|
||||||
>
|
@click=${this.onClick}
|
||||||
|
?disabled=${!this.value && !this.getValue}
|
||||||
|
></sl-icon-button>
|
||||||
|
</sl-tooltip>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user