mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-10-30 14:49:14 +00:00
28 lines
691 B
TypeScript
28 lines
691 B
TypeScript
import styled from '@emotion/styled';
|
|
|
|
import type {SVGIconProps} from 'sentry/icons/svgIcon';
|
|
|
|
/**
|
|
* Taken `from events/interfaces/.../breadcrumbs/types`
|
|
*/
|
|
const IconWrapper = styled('div')<
|
|
{hasOccurred: boolean} & Required<Pick<SVGIconProps, 'color'>>
|
|
>`
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 24px;
|
|
min-width: 24px;
|
|
height: 24px;
|
|
border-radius: 50%;
|
|
color: ${p => p.theme.white};
|
|
background: ${p => p.theme[p.color] ?? p.color};
|
|
position: relative;
|
|
opacity: ${p => (p.hasOccurred ? 1 : 0.8)};
|
|
|
|
/* Make sure the icon is above the line through the back */
|
|
z-index: ${p => p.theme.zIndex.initial};
|
|
`;
|
|
|
|
export default IconWrapper;
|