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

Function PageRow

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

Source from the content-addressed store, hash-verified

190};
191
192const 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
243interface ShellBlockProps {
244 root?: ShellRoot;

Callers

nothing calls this directly

Calls 3

useShellBackFunction · 0.90
useShellActionsSlotFunction · 0.90
useMobileAppHeaderFunction · 0.90

Tested by

no test coverage detected