Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed unused props clickable and wasActive from button component #18124

Merged
2 changes: 0 additions & 2 deletions airbyte-webapp/src/components/ui/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>((props, r
variant = "primary",
children,
className,
clickable,
icon,
isLoading,
wasActive,
width,
disabled,
...buttonProps
Expand Down
2 changes: 0 additions & 2 deletions airbyte-webapp/src/components/ui/Button/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ type ButtonSize = "xs" | "sm" | "lg";
type ButtonVariant = "primary" | "secondary" | "danger" | "light" | "clear" | "dark";

export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
clickable?: boolean;
full?: boolean;
icon?: React.ReactElement;
iconPosition?: "left" | "right";
isLoading?: boolean;
size?: ButtonSize;
variant?: ButtonVariant;
wasActive?: boolean;
width?: number;
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ const UpgradeAllButton: React.FC<UpdateAllButtonProps> = ({ onUpdate, isLoading,
className={styles.updateButton}
onClick={onUpdate}
isLoading={isLoading}
wasActive={hasSuccess}
icon={hasSuccess ? undefined : <TryArrow icon={faRedoAlt} />}
>
{hasSuccess ? <FormattedMessage id="admin.upgraded" /> : <FormattedMessage id="admin.upgradeAll" />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const StyledButton = styled.button<ButtonProps>`
line-height: 15px;
outline: none;
padding: 0 10px 0 0;
pointer-events: ${(props) => (props.wasActive && !props.clickable ? "none" : "all")};
text-align: center;
text-decoration: none;
width: ${(props) => (props.full ? "100%" : "auto")};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ const RequestConnectorModal: React.FC<RequestConnectorModalProps> = ({
className={styles.requestButton}
// type="submit"
onClick={handleSubmit}
wasActive={hasFeedback}
>
{hasFeedback ? <FormattedMessage id="connector.requested" /> : <FormattedMessage id="connector.request" />}
</Button>
Expand Down