3e2c181c40
* update dependencies * rm `import type React from 'react'` * run codemods * patch discord types * update types/react-dom * Update yarn.lock
30 lines
646 B
TypeScript
30 lines
646 B
TypeScript
import {type JSX} from 'react'
|
|
|
|
import {Header} from '#/components/Layout'
|
|
|
|
/**
|
|
* Legacy ViewHeader component. Use Layout.Header going forward.
|
|
*
|
|
* @deprecated use `Layout.Header` from `#/components/Layout.tsx`
|
|
*/
|
|
export function ViewHeader({
|
|
title,
|
|
renderButton,
|
|
}: {
|
|
title: string
|
|
subtitle?: string
|
|
showOnDesktop?: boolean
|
|
showBorder?: boolean
|
|
renderButton?: () => JSX.Element
|
|
}) {
|
|
return (
|
|
<Header.Outer>
|
|
<Header.BackButton />
|
|
<Header.Content>
|
|
<Header.TitleText>{title}</Header.TitleText>
|
|
</Header.Content>
|
|
<Header.Slot>{renderButton?.() ?? null}</Header.Slot>
|
|
</Header.Outer>
|
|
)
|
|
}
|