Adding the button links

This commit is contained in:
Made4Uo
2024-06-23 01:35:40 -07:00
parent cbb7790e8f
commit e47de401ab
3 changed files with 19 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
import { Box, Stack } from '@mui/material'; import { Button, Box, Stack } from '@mui/material';
import Typography from '@mui/material/Typography'; import Typography from '@mui/material/Typography';
interface ToolHeaderProps { interface ToolHeaderProps {
@@ -7,6 +7,22 @@ interface ToolHeaderProps {
image?: string; image?: string;
} }
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>
);
}
export default function ToolHeader({ export default function ToolHeader({
image, image,
title, title,
@@ -19,6 +35,7 @@ export default function ToolHeader({
{title} {title}
</Typography> </Typography>
<Typography fontSize={20}>{description}</Typography> <Typography fontSize={20}>{description}</Typography>
<ToolLinks />
</Box> </Box>
{image && <img width={'250'} src={image} />} {image && <img width={'250'} src={image} />}
</Stack> </Stack>

View File

@@ -44,7 +44,7 @@ export default function ToolTextInput({
fileInputRef.current?.click(); fileInputRef.current?.click();
}; };
return ( return (
<Box> <Box id="tool">
<Typography fontSize={30} color={'primary'}> <Typography fontSize={30} color={'primary'}>
{title} {title}
</Typography> </Typography>

View File

@@ -11,8 +11,6 @@ export function mergeText(
deleteTrailingSpaces ? line.replace(/ |\r\n|\n|\r/gm, '') : line deleteTrailingSpaces ? line.replace(/ |\r\n|\n|\r/gm, '') : line
) )
.filter((line) => !deleteBlankLines || line.trim() !== ''); .filter((line) => !deleteBlankLines || line.trim() !== '');
// Join lines and remove spaces right after each line
return processedLines.join(joinCharacter); return processedLines.join(joinCharacter);
} }