import styled from '@emotion/styled'; import {HeaderTitleLegend} from 'sentry/components/charts/styles'; import QuestionTooltip from 'sentry/components/questionTooltip'; import TextOverflow from 'sentry/components/textOverflow'; import {space} from 'sentry/styles/space'; import {MEPTag} from 'sentry/utils/performance/contexts/metricsEnhancedPerformanceDataContext'; import { GenericPerformanceWidgetProps, WidgetDataConstraint, WidgetDataProps, } from '../types'; export function WidgetHeader( props: GenericPerformanceWidgetProps & WidgetDataProps ) { const {title, titleTooltip, Subtitle, HeaderActions, InteractiveTitle} = props; return ( {InteractiveTitle ? ( ) : ( {title} )} {titleTooltip && ( )} {Subtitle ? : null} {HeaderActions && } ); } const StyledHeaderTitleLegend = styled(HeaderTitleLegend)` position: relative; z-index: initial; top: -${space(0.5)}; `; const TitleContainer = styled('div')` display: flex; flex-direction: column; align-items: flex-start; `; const WidgetHeaderContainer = styled('div')` display: flex; justify-content: space-between; align-items: flex-start; gap: ${space(1)}; `; const HeaderActionsContainer = styled('div')` display: flex; align-items: center; gap: ${space(1)}; `;