omni-tools/src/components/ToolHeader.tsx

44 lines
999 B
TypeScript
Raw Normal View History

2024-06-23 01:35:40 -07:00
import { Button, Box, Stack } from '@mui/material';
2024-06-22 22:06:16 +01:00
import Typography from '@mui/material/Typography';
2024-06-19 21:18:35 +01:00
interface ToolHeaderProps {
title: string;
description: string;
2024-06-23 01:26:04 +01:00
image?: string;
2024-06-19 21:18:35 +01:00
}
2024-06-23 01:35:40 -07:00
function ToolLinks() {
return (
<Box display="flex" gap={2} my={2}>
<Button variant="outlined" href="#tool">
Use This Tool
</Button>
<Button variant="outlined" href="#examples">
See Examples
</Button>
<Button variant="outlined" href="#tour">
Learn How to Use
</Button>
</Box>
);
}
2024-06-23 01:26:04 +01:00
export default function ToolHeader({
image,
title,
description
}: ToolHeaderProps) {
2024-06-22 22:06:16 +01:00
return (
2024-06-24 02:51:22 +01:00
<Stack direction={'row'} alignItems={'center'} spacing={2} my={4}>
2024-06-22 22:06:16 +01:00
<Box>
<Typography mb={2} fontSize={30} color={'primary'}>
{title}
</Typography>
<Typography fontSize={20}>{description}</Typography>
2024-06-23 01:35:40 -07:00
<ToolLinks />
2024-06-22 22:06:16 +01:00
</Box>
2024-06-23 01:26:04 +01:00
{image && <img width={'250'} src={image} />}
2024-06-22 22:06:16 +01:00
</Stack>
);
2024-06-19 21:18:35 +01:00
}