Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Increase tables to full size width #12106

Merged
merged 13 commits into from
Dec 6, 2024
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
import { ReactNode } from "react";

interface AdminContentWrapperProps {
table?: boolean;
children: ReactNode;
}

const AdminContentWrapper = ({ children }: AdminContentWrapperProps) => (
<div data-h2-wrapper="base(center, large, x1) p-tablet(center, large, x2)">
<div data-h2-padding="base(0, 0, x3, 0)">{children}</div>
const AdminContentWrapper = ({ table, children }: AdminContentWrapperProps) => (
<div
{...(table
? {
"data-h2-wrapper":
"base(center, full, x1) p-tablet(center, full, x2)",
"data-h2-padding": "base(x3, 0)",
}
: {
"data-h2-wrapper":
"base(center, large, x1) p-tablet(center, large, x2)",
"data-h2-padding": "base(x3, 0)",
})}
>
{children}
</div>
);

Expand Down
24 changes: 23 additions & 1 deletion apps/web/src/components/Hero/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const paddingMap = {

interface NavTab {
url: string;
label: string;
label: ReactNode;
}

interface HeroSharedProps {
Expand All @@ -41,6 +41,8 @@ interface HeroSharedProps {
buttonLinks?: ButtonLinkType[];
children?: ReactNode;
centered?: boolean;
status?: ReactNode;
additionalContent?: ReactNode;
}

type HeroWithNavTabsProps = HeroSharedProps & {
Expand All @@ -63,6 +65,8 @@ const Hero = (props: HeroWithNavTabsProps | HeroWithOverlapProps) => {
buttonLinks,
children,
centered = false,
status,
additionalContent,
} = props;
// conditional props
const navTabs = "navTabs" in props ? props.navTabs : null;
Expand Down Expand Up @@ -217,6 +221,24 @@ const Hero = (props: HeroWithNavTabsProps | HeroWithOverlapProps) => {
</div>
) : null}
</div>
<div
data-h2-position="base(absolute)"
data-h2-top="base(x1) p-tablet(x1.5)"
data-h2-right="base(x1) p-tablet(x5)"
>
{status}
</div>
{additionalContent ? (
<>
<div
data-h2-wrapper="base(center, large, x1) p-tablet(center, large, x2)"
data-h2-position="base(relative)"
data-h2-z-index="base(3)"
>
{additionalContent}
</div>
</>
) : null}
</div>
{children ? (
<>
Expand Down
62 changes: 0 additions & 62 deletions apps/web/src/components/HeroDeprecated/HeroDeprecated.stories.tsx

This file was deleted.

247 changes: 0 additions & 247 deletions apps/web/src/components/HeroDeprecated/HeroDeprecated.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions apps/web/src/components/HeroDeprecated/index.ts

This file was deleted.

Loading
Loading