fix: nav bar ui tweak

This commit is contained in:
BennyKok 2024-01-19 16:54:38 +08:00
parent e220921440
commit e7e91f4c50
6 changed files with 7 additions and 11 deletions

View File

@ -91,7 +91,7 @@ export function InsertModal<
<div className="flex justify-end"> <div className="flex justify-end">
<AutoFormSubmit> <AutoFormSubmit>
Save Changes Save Changes
<span className="ml-2">{isLoading && <LoadingIcon />}</span> {isLoading && <LoadingIcon />}
</AutoFormSubmit> </AutoFormSubmit>
</div> </div>
</AutoForm> </AutoForm>

View File

@ -38,9 +38,9 @@ export function Navbar() {
{!isDesktop && ( {!isDesktop && (
<Sheet> <Sheet>
<SheetTrigger asChild> <SheetTrigger asChild>
<Button variant="ghost" className="w-8 h-8 p-2"> <button className="flex items-center justify-center w-8 h-8 p-2">
<Menu /> <Menu />
</Button> </button>
</SheetTrigger> </SheetTrigger>
<SheetContent side="left" className="flex flex-col gap-4"> <SheetContent side="left" className="flex flex-col gap-4">
<SheetHeader> <SheetHeader>

View File

@ -92,9 +92,7 @@ export function RunWorkflowInline({
<div className="flex justify-end"> <div className="flex justify-end">
<AutoFormSubmit disabled={isLoading || loading}> <AutoFormSubmit disabled={isLoading || loading}>
Run Run
<span className="ml-2"> {isLoading || loading ? <LoadingIcon /> : <Play size={14} />}
{isLoading || loading ? <LoadingIcon /> : <Play size={14} />}
</span>
</AutoFormSubmit> </AutoFormSubmit>
</div> </div>
</AutoForm> </AutoForm>

View File

@ -281,9 +281,7 @@ export function RunWorkflowButton({
<div className="flex justify-end"> <div className="flex justify-end">
<AutoFormSubmit> <AutoFormSubmit>
Run Run
<span className="ml-2"> {isLoading ? <LoadingIcon /> : <Play size={14} />}
{isLoading ? <LoadingIcon /> : <Play size={14} />}
</span>
</AutoFormSubmit> </AutoFormSubmit>
</div> </div>
</AutoForm> </AutoForm>

View File

@ -21,7 +21,7 @@ export function AutoFormSubmit({
disabled?: boolean; disabled?: boolean;
}) { }) {
return ( return (
<Button type="submit" disabled={disabled}> <Button type="submit" disabled={disabled} className="flex gap-2">
{children ?? "Submit"} {children ?? "Submit"}
</Button> </Button>
); );

View File

@ -184,7 +184,7 @@ const buttonVariants = cva(styles.base, {
outline: styles.outline, outline: styles.outline,
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80", secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
ghost: styles.plain, ghost: styles.plain,
link: "text-primary underline-offset-4 hover:underline", link: "border-none text-primary underline-offset-4 hover:underline",
}, },
size: { size: {
default: "h-10 px-4 py-2", default: "h-10 px-4 py-2",