({
title,
titleFades,
isOverCover,
onBack,
}: {
title?: ReactNode;
titleFades?: boolean;
isOverCover?: boolean;
onBack?: () => void;
})
| 190 | }; |
| 191 | |
| 192 | const PageRow = ({ |
| 193 | title, |
| 194 | titleFades, |
| 195 | isOverCover, |
| 196 | onBack, |
| 197 | }: { |
| 198 | title?: ReactNode; |
| 199 | titleFades?: boolean; |
| 200 | isOverCover?: boolean; |
| 201 | onBack?: () => void; |
| 202 | }): ReactElement => { |
| 203 | const historyBack = useShellBack(); |
| 204 | const goBack = onBack ?? historyBack; |
| 205 | const setActionsSlot = useShellActionsSlot(); |
| 206 | const isMobileAppHeader = useMobileAppHeader(); |
| 207 | |
| 208 | return ( |
| 209 | <div |
| 210 | className="flex items-center" |
| 211 | style={{ |
| 212 | height: topButton.size + 14, |
| 213 | paddingInline: topButton.inset, |
| 214 | gap: topButton.gap, |
| 215 | }} |
| 216 | > |
| 217 | <ShellSquare aria-label="Go back" onClick={goBack}> |
| 218 | <ArrowIcon size={IconSize.Small} className="-rotate-90" /> |
| 219 | </ShellSquare> |
| 220 | {title ? ( |
| 221 | <h1 |
| 222 | className={classNames( |
| 223 | 'min-w-0 flex-1 truncate px-1 font-bold typo-callout', |
| 224 | titleFades && 'shell-title-in', |
| 225 | )} |
| 226 | > |
| 227 | {title} |
| 228 | </h1> |
| 229 | ) : ( |
| 230 | <span className="min-w-0 flex-1" /> |
| 231 | )} |
| 232 | <div |
| 233 | className="flex shrink-0 items-center" |
| 234 | style={{ gap: topButton.gap }} |
| 235 | > |
| 236 | <div ref={setActionsSlot} className="contents" /> |
| 237 | {isMobileAppHeader && <MobileAppActions isFloating={isOverCover} />} |
| 238 | </div> |
| 239 | </div> |
| 240 | ); |
| 241 | }; |
| 242 | |
| 243 | interface ShellBlockProps { |
| 244 | root?: ShellRoot; |
nothing calls this directly
no test coverage detected