@kiwicom/orbit-components
Version:
Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.
18 lines • 1.11 kB
JavaScript
import styled, { css, keyframes } from "styled-components";
import { convertHexToRgba } from "@kiwicom/orbit-design-tokens";
import defaultTheme from "../../../defaultTheme";
import { renderStatus } from "./helpers";
const pulseAnimation = keyframes(["0%{transform:scale(0.01);}50%{transform:scale(1);}100%{transform:scale(0.01);}"]);
const StyledIconWrapper = styled.div.withConfig({
displayName: "StyledIconWrapper",
componentId: "sc-1l9vlmm-0"
})(["", ";"], ({
theme,
mobile,
status,
active
}) => css(["display:flex;align-items:center;justify-content:center;min-width:", ";z-index:1;text-align:center;position:relative;height:20px;line-height:", ";&:after{position:absolute;top:0px;left:", ";content:\"\";height:20px;width:20px;border-radius:100%;", ";background:", ";}"], mobile && theme.orbit.spaceLarge, theme.orbit.lineHeightTextSmall, mobile ? "2px" : "-2px", active && css(["animation:", " 2.5s ease-in-out infinite;"], pulseAnimation), status && convertHexToRgba(renderStatus(status, theme), 10)));
StyledIconWrapper.defaultProps = {
theme: defaultTheme
};
export default StyledIconWrapper;