import { css, cx } from '@emotion/css'; import React from 'react'; import { useStyles2 } from '../../themes'; import { commonColorsPalette } from '../../themes/default'; import { Icon } from '../Icon/Icon'; import { Tooltip } from '../Tooltip/Tooltip'; /** * @internal */ export type ErrorIndicatorProps = { error?: string; onClick?: () => void; }; /** * @internal */ export const ErrorIndicator = ({ error, onClick }: ErrorIndicatorProps) => { const styles = useStyles2(getStyles); if (!error) { return null; } return ( ); }; const getStyles = () => { return { clickable: css({ cursor: 'pointer', }), icon: css({ color: `${commonColorsPalette.red88}`, }), }; };