Skip to content

Commit 7504653

Browse files
committed
moved copy button inside <pre> to get rid of the duplicating issue. However there is a scroll issue
1 parent acf18b1 commit 7504653

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

src/md.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default {
4343
{...props}
4444
class={
4545
headerBold +
46-
"heading mt-10 mb-6 -mx-.5 break-words text-4xl leading-tight mdx-heading"
46+
"heading mt-10 mb-6 -mx-.5 break-words text-4xl leading-tight mdx-heading"
4747
}
4848
>
4949
<MetaTitle>{props.children}</MetaTitle>
@@ -62,7 +62,7 @@ export default {
6262
{...props}
6363
class={
6464
headerBold +
65-
"heading text-2xl leading-10 my-6 mdx-heading text-solid-accent dark:text-solid-accentlight"
65+
"heading text-2xl leading-10 my-6 mdx-heading text-solid-accent dark:text-solid-accentlight"
6666
}
6767
>
6868
<Anchor id={props.id}>{props.children}</Anchor>
@@ -132,8 +132,8 @@ export default {
132132
Link,
133133
TesterComponent: () => (
134134
<p>
135-
Remove This Now!!! If you see this it means that markdown custom
136-
components does work
135+
Remove This Now!!! If you see this it means that markdown custom
136+
components does work
137137
</p>
138138
),
139139
code: (props) => {
@@ -158,19 +158,19 @@ export default {
158158
get class() {
159159
return (
160160
props.className +
161-
" " +
162-
(props.bad ? "border-red-400 border-1" : "")
161+
" relative " +
162+
(props.bad ? "border-red-400 border-1" : "")
163163
)
164164
},
165-
get className() {
166-
return undefined
167-
},
165+
// get className() {
166+
// return undefined
167+
// },
168168
})}
169169
ref={ref}
170170
>
171+
<CopyButton parentRef={ref} />
171172
{props.children}
172173
</pre>
173-
<CopyButton parentRef={ref} />
174174
</div>
175175
)
176176
},

0 commit comments

Comments
 (0)