feat: no flex 1

This commit is contained in:
TrèsAbhi committed 2024-05-04 16:39:41 -05:00
1 parent a7f2c3e324
commit a5b3177394
4 files changed
+6 -3

No files matched your search

@@ -8,7 +8,7 @@ export function HistoricalSection() {
if (!tank.description) return null; if (!tank.description) return null;
return ( return (
<PageWrapper> <PageWrapper noFlex1>
<Heading>History of the {tank.name}</Heading> <Heading>History of the {tank.name}</Heading>
<Text>{tank.description}</Text> <Text>{tank.description}</Text>
</PageWrapper> </PageWrapper>
@@ -128,6 +128,7 @@ export function TechTreeSection() {
return ( return (
<PageWrapper <PageWrapper
noFlex1
containerProps={{ containerProps={{
style: { style: {
overflow: 'hidden', overflow: 'hidden',
@@ -14,7 +14,7 @@ export function Videos() {
if (isFullScreen || videos.length === 0) return null; if (isFullScreen || videos.length === 0) return null;
return ( return (
<PageWrapper> <PageWrapper noFlex1>
<Flex direction="column" gap="4" align="start"> <Flex direction="column" gap="4" align="start">
<Heading size="6">Review videos</Heading> <Heading size="6">Review videos</Heading>
+3 -1
View File
@@ -9,6 +9,7 @@ type PageWrapperProps = FlexProps & {
noMaxWidth?: boolean; noMaxWidth?: boolean;
highlight?: boolean; highlight?: boolean;
containerProps?: ComponentProps<typeof Theme>; containerProps?: ComponentProps<typeof Theme>;
noFlex1?: boolean;
}; };
export default function PageWrapper({ export default function PageWrapper({
@@ -18,6 +19,7 @@ export default function PageWrapper({
children, children,
noPadding = false, noPadding = false,
noMaxWidth = false, noMaxWidth = false,
noFlex1 = false,
highlight = false, highlight = false,
containerProps, containerProps,
...props ...props
@@ -27,7 +29,7 @@ export default function PageWrapper({
{...containerProps} {...containerProps}
accentColor={color} accentColor={color}
style={{ style={{
flex: 1, flex: noFlex1 ? undefined : 1,
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
background: highlight background: highlight