feat: introduce basic flows page
This commit is contained in:
38
packages/web/src/components/FlowRow/index.tsx
Normal file
38
packages/web/src/components/FlowRow/index.tsx
Normal file
@@ -0,0 +1,38 @@
|
||||
import * as React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import Card from '@mui/material/Card';
|
||||
import Box from '@mui/material/Box';
|
||||
import CardActionArea from '@mui/material/CardActionArea';
|
||||
import ArrowForwardIosIcon from '@mui/icons-material/ArrowForwardIos';
|
||||
|
||||
import type { Flow } from 'types/flow';
|
||||
import * as URLS from 'config/urls';
|
||||
import { CardContent, Typography } from './style';
|
||||
|
||||
type FlowRowProps = {
|
||||
flow: Flow;
|
||||
}
|
||||
|
||||
export default function FlowRow(props: FlowRowProps) {
|
||||
const { flow } = props;
|
||||
|
||||
return (
|
||||
<Link to={URLS.FLOW(flow.id)}>
|
||||
<Card sx={{ mb: 1 }}>
|
||||
<CardActionArea>
|
||||
<CardContent>
|
||||
<Box>
|
||||
<Typography variant="h6" noWrap>
|
||||
{flow.name}
|
||||
</Typography>
|
||||
</Box>
|
||||
|
||||
<Box>
|
||||
<ArrowForwardIosIcon sx={{ color: (theme) => theme.palette.primary.main }} />
|
||||
</Box>
|
||||
</CardContent>
|
||||
</CardActionArea>
|
||||
</Card>
|
||||
</Link>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user