import styled from '@emotion/styled'; import GuideAnchor from 'sentry/components/assistant/guideAnchor'; import Tooltip from 'sentry/components/tooltip'; import {t} from 'sentry/locale'; type Props = { newestFirst: boolean; title: string; beforeTitle?: React.ReactNode; hideGuide?: boolean; onChange?: ({newestFirst}: {newestFirst: boolean}) => void; }; const CrashTitle = ({ title, newestFirst, beforeTitle, hideGuide = false, onChange, }: Props) => { const handleToggleOrder = () => { if (onChange) { onChange({newestFirst: !newestFirst}); } }; return ( {beforeTitle} {title} {onChange && ( ( {newestFirst ? t('most recent call first') : t('most recent call last')} ) )} ); }; export default CrashTitle; const Wrapper = styled('div')` display: flex; align-items: center; flex-wrap: wrap; flex-grow: 1; justify-content: flex-start; `; const StyledH3 = styled('h3')` margin-bottom: 0; max-width: 100%; white-space: nowrap; `;