import * as React from 'react' import styled from 'styled-components' import { Tooltip } from '@planview/pv-uikit' import { theme, sizePx, cursor } from '@planview/pv-utilities' const LabelAsterisk = styled.span` ${cursor.initial}; display: inline-grid; place-content: flex-start center; width: ${sizePx.xsmall}; height: ${sizePx.xsmall}; vertical-align: middle; /* This prevents the asterisk from changing the height of the label wrapper */ margin: -2px 0 0; position: relative; top: 1px; ` const Asterisk = ({ tooltip }: { tooltip?: string }) => { const styledAsterisk = ( ) return tooltip ? ( {styledAsterisk} ) : ( styledAsterisk ) } export default Asterisk