MCPcopy Create free account
hub / github.com/dailydotdev/apps / PageRow

Function PageRow

packages/shared/src/components/shell/ShellBlock.tsx:193–242  ·  view source on GitHub ↗
({
  title,
  titleFades,
  isOverCover,
  onBack,
}: {
  title?: ReactNode;
  titleFades?: boolean;
  isOverCover?: boolean;
  onBack?: () => void;
})

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

useShellBackFunction · 0.90
useShellActionsSlotFunction · 0.90
useMobileAppHeaderFunction · 0.90

Tested by

no test coverage detected