CommandInfo & window edits

Signed-off-by: FTCHD <144691102+FTCHD@users.noreply.github.com>
This commit is contained in:
FTCHD
2025-11-02 15:21:57 +01:00
parent ace0b8dd7a
commit 5de5e85860
2 changed files with 38 additions and 2 deletions
+2 -2
View File
@@ -80,8 +80,8 @@ export async function openFullWindow({
export async function openWindow({
name,
url,
width = 820,
height = platform() === 'windows' ? 730 : 700,
width = 840,
height = platform() === 'windows' ? 755 : 725,
}: {
name: string
url: string
+36
View File
@@ -0,0 +1,36 @@
import { Accordion, AccordionItem } from '@heroui/react'
import { InfoIcon } from 'lucide-react'
import { startTransition, useState } from 'react'
export default function CommandInfo({ content }: { content: string }) {
const [isOpen, setIsOpen] = useState(false)
return (
<Accordion
variant="light"
fullWidth={true}
onSelectionChange={() => {
startTransition(() => {
setIsOpen((prev) => !prev)
})
}}
>
<AccordionItem
key="command-info"
title={
isOpen
? 'Tap here to hide the info about this command'
: 'Tap here to see more info about this command'
}
classNames={{
base: '-mx-2 bg-primary-100 rounded-b-large px-8 whitespace-pre-wrap text-primary-900',
trigger: 'pb-1.5 pt-1 !cursor-pointer',
title: 'text-small !cursor-pointer text-primary-700 font-light',
}}
indicator={<InfoIcon className="text-primary-800 size-3.5" />}
>
{content}
</AccordionItem>
</Accordion>
)
}