PromucFlow_constructor/app/client/src/components/designSystems/appsmith/CloseButton.tsx
f0c1s 7a3985f962
feat: git discard changes (#11835)
* feat: git discard changes
* fixed cypress test in git connection
* feat: add discardDocUrl and update casing
* chore: update tests
* chore: fix review comment

Co-authored-by: haojin111 <haojin828@outlook.com>
2022-05-06 10:14:24 +05:30

41 lines
792 B
TypeScript

import React from "react";
import styled from "styled-components";
import { Color } from "constants/Colors";
import { Button } from "@blueprintjs/core";
type CloseButtonProps = {
color: Color;
size: number;
onClick: React.MouseEventHandler;
className?: string;
};
const StyledButton = styled(Button)<CloseButtonProps>`
position: absolute;
top: 0;
right: 3px;
justify-content: center;
padding: 0;
color: ${(props) => props.color};
& svg {
width: ${(props) => props.size};
height: ${(props) => props.size};
& path {
fill: ${(props) => props.color};
}
}
`;
export function CloseButton(props: CloseButtonProps) {
return (
<StyledButton
className={props.className}
{...props}
minimal
rightIcon="cross"
/>
);
}