PromucFlow_constructor/app/client/src/constants/IconConstants.tsx
f0c1s 64669f5e45
feat: ssh key regeneration (#11018)
feat/ssh-key-regeneration - implementation

- moved copy icon inside the input box
- added regenerate ssh key function on git connection
- remove learn more and paste text from top
- introduce SSH Key label
- introduce ads/NotificationBanner
- update NotificationBanner integration
- jest tests
- system notification on key regeneration
- use @appsmith for constants/messages
- update imports
- remove optional chaining

Co-authored-by: haojin111 <haojin828@outlook.com>
2022-02-16 10:15:35 +00:00

51 lines
1.2 KiB
TypeScript

import styled from "styled-components";
import { Color } from "./Colors";
export type IconProps = {
width?: number;
height?: number;
color?: Color;
background?: Color;
onClick?: (e?: any) => void;
className?: string;
keepColors?: boolean;
disabled?: boolean;
cursor?: "move" | "grab" | "default";
};
export const IconWrapper = styled.div<IconProps>`
&:focus {
outline: none;
}
display: inline-flex;
width: ${(props) => props.width}px;
height: ${(props) => props.height}px;
cursor: ${(props) =>
props.disabled
? "not-allowed"
: props.onClick
? "pointer"
: props.cursor ?? "default"};
opacity: ${(props) => (props.disabled ? 0.5 : 1)};
&& svg {
width: ${(props) => props.width || props.theme.fontSizes[6]}px;
height: ${(props) => props.height || props.theme.fontSizes[6]}px;
${(props) =>
!props.keepColors
? `
path {
fill: ${props.color || props.theme.colors.textOnDarkBG};
}
circle {
fill: ${props.background || props.theme.colors.paneBG};
}
rect {
fill: ${props.background || props.theme.colors.propertyPane.jsIconBg};
}`
: ""}
}
`;