-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1fb0e46
commit e27225c
Showing
7 changed files
with
188 additions
and
222 deletions.
There are no files selected for viewing
59 changes: 11 additions & 48 deletions
59
apps/web/src/app/automations/settings/components/header-automation/header-automation.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,22 @@ | ||
import { Group, Text, Title, Button, Anchor, Box } from "@mantine/core"; | ||
import { PageTitle } from "../../../../../components/page-title"; | ||
import { IconBook2 } from "@tabler/icons-react"; | ||
import { Text, Divider, Stack } from "@mantine/core"; | ||
import { ImageDemo } from "../image-demo"; | ||
import { ReactNode } from "react"; | ||
import { SectionBenefits } from "../section-benefits/section-benefits"; | ||
import { AutomationCard } from "../../../use-automation-cards"; | ||
|
||
interface HeaderAutomationProps { | ||
icon: string; | ||
title: string; | ||
docsUrl: string; | ||
demoUrl: string; | ||
description: string; | ||
demoImgHeight?: number; | ||
benefits: ReactNode; | ||
automation: AutomationCard; | ||
} | ||
|
||
export const HeaderAutomation = ({ | ||
icon, | ||
title, | ||
docsUrl, | ||
demoUrl, | ||
description, | ||
demoImgHeight, | ||
benefits, | ||
}: HeaderAutomationProps) => { | ||
export const HeaderAutomation = ({ automation }: HeaderAutomationProps) => { | ||
return ( | ||
<> | ||
<ImageDemo title={title} src={demoUrl} height={demoImgHeight} /> | ||
<Stack p="md"> | ||
<ImageDemo title={automation.title} src={automation.demoUrl} /> | ||
|
||
<Box mt="xl" bg="dark.8"> | ||
<PageTitle | ||
title={ | ||
<Group gap="xs"> | ||
<Text fz={32}>{icon}</Text> | ||
<Title mb={0} order={2}> | ||
{title} | ||
</Title> | ||
</Group> | ||
} | ||
> | ||
{docsUrl && ( | ||
<Anchor underline="never" target="_blank" href={docsUrl}> | ||
<Button | ||
variant="subtle" | ||
color="dark.1" | ||
leftSection={<IconBook2 stroke={1.5} size={20} />} | ||
> | ||
Docs | ||
</Button> | ||
</Anchor> | ||
)} | ||
</PageTitle> | ||
|
||
<Text mt="md">{description}</Text> | ||
<Box mt="md">{benefits}</Box> | ||
</Box> | ||
<Text>{automation.description}</Text> | ||
<SectionBenefits benefits={automation.benefits} /> | ||
</Stack> | ||
<Divider my="md" /> | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.