File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
static/app/components/layouts Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {Tabs} from '@sentry/scraps/tabs';
1212
1313import { usePrimaryNavigation } from 'sentry/views/navigation/primaryNavigationContext' ;
1414import { SecondaryNavigationContext } from 'sentry/views/navigation/secondaryNavigationContext' ;
15+ import { TopBar } from 'sentry/views/navigation/topBar' ;
1516import { useHasPageFrameFeature } from 'sentry/views/navigation/useHasPageFrameFeature' ;
1617
1718/**
@@ -137,7 +138,16 @@ export const HeaderActions = styled('div')`
137138 * Includes flex gap for additional items placed with the text (such as feature
138139 * badges or ID badges)
139140 */
140- export const Title = styled ( 'h1' ) < { withMargins ?: boolean } > `
141+ export function Title ( props : React . ComponentProps < typeof LegacyTitle > ) {
142+ const hasPageFrame = useHasPageFrameFeature ( ) ;
143+
144+ if ( hasPageFrame ) {
145+ return < TopBar . Slot name = "title" > { props . children } </ TopBar . Slot > ;
146+ }
147+
148+ return < LegacyTitle { ...props } /> ;
149+ }
150+ const LegacyTitle = styled ( 'h1' ) < { withMargins ?: boolean } > `
141151 width: 100%;
142152 white-space: nowrap;
143153 overflow: hidden;
You can’t perform that action at this time.
0 commit comments