fix: optimize copy button style
This commit is contained in:
@@ -89,9 +89,9 @@ export function htmlRender(el: HTMLElement | null, config?: htmlRenderConfig) {
|
||||
codeTool.className = 'a-code-tool';
|
||||
const uniqueId = `a-copy-code-${Date.now().toString().substring(5)}-${Math.floor(Math.random() * 10)}${Math.floor(Math.random() * 10)}${Math.floor(Math.random() * 10)}`;
|
||||
const str = `
|
||||
<button type="button" class="btn btn-dark rounded-0 a-copy-code" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="${copyText}" id="${uniqueId}">
|
||||
<a role="button" class="link-secondary a-copy-code" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-title="${copyText}" id="${uniqueId}">
|
||||
<i class="br bi-copy"></i>
|
||||
</button>
|
||||
</a>
|
||||
`;
|
||||
codeTool.innerHTML = str;
|
||||
|
||||
|
||||
+3
-11
@@ -380,18 +380,10 @@ img[src=""] {
|
||||
}
|
||||
.a-code-tool {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
top: 0.5rem;
|
||||
right: 0.5rem;
|
||||
font-size: 16px;
|
||||
z-index: 1;
|
||||
display: none;
|
||||
.a-copy-code {
|
||||
line-height: 24px;
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 0;
|
||||
}
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user