Skip to content

Commit 6f1fcbc

Browse files
committed
bring back sticky copy button
1 parent fbf2853 commit 6f1fcbc

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

examples/server/webui/src/components/ChatScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export default function ChatScreen() {
7070
>
7171
<div className="flex flex-col w-full max-w-[900px] mx-auto">
7272
{/* chat messages */}
73-
<div id="messages-list" className="flex flex-col grow overflow-y-auto">
73+
<div id="messages-list" className="grow">
7474
<div className="mt-auto flex justify-center">
7575
{/* placeholder to shift the message to the bottom */}
7676
{viewingConversation ? '' : 'Send a message to start'}

examples/server/webui/src/components/MarkdownDisplay.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const CodeBlockButtons: React.ElementType<
7777
return (
7878
<div
7979
className={classNames({
80-
'text-right sticky top-4 mb-2 mr-2 h-0': true,
80+
'text-right sticky top-[7em] mb-2 mr-2 h-0': true,
8181
'display-none': !node?.position,
8282
})}
8383
>
@@ -152,9 +152,7 @@ function rehypeCustomCopyButton() {
152152
// replace current node
153153
preNode.properties.visited = 'true';
154154
node.tagName = 'div';
155-
node.properties = {
156-
className: 'relative my-4',
157-
};
155+
node.properties = {};
158156
// add node for button
159157
const btnNode: ElementContent = {
160158
type: 'element',

0 commit comments

Comments
 (0)