mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
fix spacing
This commit is contained in:
parent
ddd9cf857f
commit
c02f1de758
3 changed files with 10 additions and 7 deletions
|
|
@ -9,23 +9,21 @@ import { VoidCodeEditor, VoidCodeEditorProps } from '../util/inputs.js';
|
||||||
|
|
||||||
|
|
||||||
export const BlockCode = ({ buttonsOnHover, ...codeEditorProps }: { buttonsOnHover?: React.ReactNode } & VoidCodeEditorProps) => {
|
export const BlockCode = ({ buttonsOnHover, ...codeEditorProps }: { buttonsOnHover?: React.ReactNode } & VoidCodeEditorProps) => {
|
||||||
|
|
||||||
const isSingleLine = !codeEditorProps.initValue.includes('\n')
|
const isSingleLine = !codeEditorProps.initValue.includes('\n')
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className={`relative group w-full overflow-hidden`}>
|
<div className="relative group w-full overflow-hidden">
|
||||||
|
|
||||||
{buttonsOnHover === null ? null : (
|
{buttonsOnHover === null ? null : (
|
||||||
<div className="z-[1] absolute top-0 right-0 opacity-0 group-hover:opacity-100 duration-200">
|
<div className={`z-[1] absolute top-0 right-0 opacity-0 group-hover:opacity-100 duration-200 ${isSingleLine ? 'h-full flex items-center' : ''
|
||||||
<div className={`flex space-x-2 ${isSingleLine ? '' : 'p-2'}`}>
|
}`}>
|
||||||
|
<div className={`flex space-x-1 ${isSingleLine ? 'pr-2' : 'p-2'}`}>
|
||||||
{buttonsOnHover}
|
{buttonsOnHover}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<VoidCodeEditor {...codeEditorProps} />
|
<VoidCodeEditor {...codeEditorProps} />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ export const Sidebar = ({ className }: { className: string }) => {
|
||||||
<div
|
<div
|
||||||
// default background + text styles for sidebar
|
// default background + text styles for sidebar
|
||||||
className={`
|
className={`
|
||||||
w-full h-full py-2
|
w-full h-full
|
||||||
bg-void-bg-2
|
bg-void-bg-2
|
||||||
text-void-fg-1
|
text-void-fg-1
|
||||||
`}
|
`}
|
||||||
|
|
|
||||||
|
|
@ -422,6 +422,11 @@ const ChatBubble = ({ chatMessage, isLoading }: {
|
||||||
// edit mode state
|
// edit mode state
|
||||||
const [isEditMode, setIsEditMode] = useState(false)
|
const [isEditMode, setIsEditMode] = useState(false)
|
||||||
|
|
||||||
|
|
||||||
|
if (!chatMessage.content) { // don't show if empty
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
let chatbubbleContents: React.ReactNode
|
let chatbubbleContents: React.ReactNode
|
||||||
|
|
||||||
if (role === 'user') {
|
if (role === 'user') {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue