Skip to content

Commit fd4b978

Browse files
committed
tweaks
1 parent dd19367 commit fd4b978

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

src/components/CopyPageButton.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,25 +88,25 @@ export default function CopyPageButton() {
8888
if (copyState === "success") {
8989
return (
9090
<>
91-
<PiCheckCircleLight className="h-4 w-4 text-green-600" />
9291
<span>Copied!</span>
92+
<PiCheckCircleLight className="text-green-600" />
9393
</>
9494
);
9595
}
9696

9797
if (copyState === "error") {
9898
return (
9999
<>
100-
<PiXCircleLight className="h-4 w-4 text-red-600" />
101-
<span>Failed to copy</span>
100+
<span>Failed</span>
101+
<PiXCircleLight className="text-red-600" />
102102
</>
103103
);
104104
}
105105

106106
return (
107107
<>
108-
<PiMarkdownLogo />
109108
<span>Copy Page</span>
109+
<PiMarkdownLogo />
110110
</>
111111
);
112112
};
@@ -116,7 +116,7 @@ export default function CopyPageButton() {
116116
<button
117117
ref={refs.setReference}
118118
{...getReferenceProps()}
119-
className="inline-flex h-8 cursor-pointer items-center justify-center gap-2 rounded border border-[--sl-color-hairline] bg-transparent px-3 text-sm text-black hover:bg-[--sl-color-bg-nav]"
119+
className="inline-flex h-8 min-w-32 cursor-pointer items-center justify-center gap-2 rounded border border-[--sl-color-hairline] bg-transparent px-3 text-sm text-black hover:bg-[--sl-color-bg-nav]"
120120
>
121121
{getButtonContent()}
122122
</button>
@@ -126,7 +126,7 @@ export default function CopyPageButton() {
126126
ref={refs.setFloating}
127127
style={floatingStyles}
128128
{...getFloatingProps()}
129-
className="min-w-[240px] list-none rounded border border-[--sl-color-hairline] bg-[--sl-color-bg] pl-0 shadow-md"
129+
className="list-none rounded border border-[--sl-color-hairline] bg-[--sl-color-bg] pl-0 shadow-md"
130130
>
131131
{options.map(({ label, description, icon: Icon, onClick }) => (
132132
<li key={label}>
@@ -135,7 +135,7 @@ export default function CopyPageButton() {
135135
className="relative block w-full cursor-pointer bg-transparent px-3 py-2 text-left text-black no-underline hover:bg-[--sl-color-bg-nav]"
136136
>
137137
<div className="flex items-center gap-2 text-sm">
138-
<Icon className="h-4 w-4" />
138+
<Icon />
139139
{label}
140140
</div>
141141
<div className="ml-6 mt-0.5 text-xs text-[--sl-color-gray-3]">

src/components/overrides/PageTitle.astro

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,11 @@ const hideBreadcrumbs = Astro.locals.starlightRoute.hideBreadcrumbs;
114114

115115
{component && <Aside>To see a list of pages this component is used on, please visit the <a href={`/style-guide/components/usage/#${component.toLowerCase()}`}>usage page</a>.</Aside>}
116116

117-
<div class="flex justify-end items-center">
118-
<CopyPageButton client:idle />
119-
</div>
117+
{frontmatter.template !== "splash" && (
118+
<div class="flex justify-end items-center">
119+
<CopyPageButton client:idle />
120+
</div>
121+
)}
120122

121123
<style>
122124
:root {

0 commit comments

Comments
 (0)