mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
Fix loading transient prop
This commit is contained in:
@@ -176,8 +176,8 @@ const StyledButton = styled(MantineButton)<StyledButtonProps>`
|
|||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const ButtonChildWrapper = styled.span<ButtonProps>`
|
const ButtonChildWrapper = styled.span<{ $loading?: boolean }>`
|
||||||
color: ${(props) => props.loading && 'transparent !important'};
|
color: ${(props) => props.$loading && 'transparent !important'};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const SpinnerWrapper = styled.div`
|
const SpinnerWrapper = styled.div`
|
||||||
@@ -193,7 +193,7 @@ export const _Button = forwardRef<HTMLButtonElement, ButtonProps>(
|
|||||||
return (
|
return (
|
||||||
<Tooltip withinPortal {...tooltip}>
|
<Tooltip withinPortal {...tooltip}>
|
||||||
<StyledButton ref={ref} loaderPosition="center" {...props}>
|
<StyledButton ref={ref} loaderPosition="center" {...props}>
|
||||||
<ButtonChildWrapper loading={props.loading}>
|
<ButtonChildWrapper $loading={props.loading}>
|
||||||
{children}
|
{children}
|
||||||
</ButtonChildWrapper>
|
</ButtonChildWrapper>
|
||||||
{props.loading && (
|
{props.loading && (
|
||||||
@@ -208,7 +208,7 @@ export const _Button = forwardRef<HTMLButtonElement, ButtonProps>(
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledButton ref={ref} loaderPosition="center" {...props}>
|
<StyledButton ref={ref} loaderPosition="center" {...props}>
|
||||||
<ButtonChildWrapper loading={props.loading}>
|
<ButtonChildWrapper $loading={props.loading}>
|
||||||
{children}
|
{children}
|
||||||
</ButtonChildWrapper>
|
</ButtonChildWrapper>
|
||||||
{props.loading && (
|
{props.loading && (
|
||||||
|
|||||||
Reference in New Issue
Block a user