diff --git a/src/renderer/src/components/ui/button/index.tsx b/src/renderer/src/components/ui/button/index.tsx index 6154183a9..24a48a2ba 100644 --- a/src/renderer/src/components/ui/button/index.tsx +++ b/src/renderer/src/components/ui/button/index.tsx @@ -193,42 +193,50 @@ export const StyledButton = React.forwardRef< React.PropsWithChildren< Omit, "children"> & BaseButtonProps & - VariantProps + VariantProps & { + buttonClassName?: string + } > ->(({ className, isLoading, variant, status, ...props }, ref) => { - const handleClick: React.MouseEventHandler = - React.useCallback( - (e) => { - if (isLoading || props.disabled) { - e.preventDefault() - return - } +>( + ( + { className, buttonClassName, isLoading, variant, status, ...props }, + ref, + ) => { + const handleClick: React.MouseEventHandler = + React.useCallback( + (e) => { + if (isLoading || props.disabled) { + e.preventDefault() + return + } - props.onClick?.(e) - }, - [isLoading, props], - ) - return ( - - - {isLoading && ( - - - + props.onClick?.(e) + }, + [isLoading, props], + ) + return ( + {props.children} - - - ) -}) + {...props} + onClick={handleClick} + > + + {isLoading && ( + + + + )} + {props.children} + + + ) + }, +) diff --git a/src/renderer/src/modules/settings/control.tsx b/src/renderer/src/modules/settings/control.tsx index ec23d6ef2..3528db865 100644 --- a/src/renderer/src/modules/settings/control.tsx +++ b/src/renderer/src/modules/settings/control.tsx @@ -48,7 +48,7 @@ export const SettingSwitch: Component<{ export const SettingDescription: Component = ({ children, className }) => ( @@ -65,8 +65,8 @@ export const SettingActionItem = ({ action: () => void buttonText: string }) => ( -
+
{label}
- {buttonText} + {buttonText}
) diff --git a/src/renderer/src/modules/settings/section.tsx b/src/renderer/src/modules/settings/section.tsx index 102637e0b..9134c98e9 100644 --- a/src/renderer/src/modules/settings/section.tsx +++ b/src/renderer/src/modules/settings/section.tsx @@ -41,7 +41,7 @@ export const SettingItemGroup: FC = ({ children }) => { } case SettingActionItem: { return cloneElement(child as React.ReactElement, { - className: "!-mt-3", + className: "!-mt-2", }) } default: {