diff --git a/packages/web/src/components/AppIcon/index.tsx b/packages/web/src/components/AppIcon/index.tsx index 3b940c90..1d07d8f6 100644 --- a/packages/web/src/components/AppIcon/index.tsx +++ b/packages/web/src/components/AppIcon/index.tsx @@ -6,6 +6,7 @@ type AppIconProps = { name?: string; url?: string; color?: string; + variant?: AvatarProps['variant']; }; const inlineImgStyle: React.CSSProperties = { @@ -13,12 +14,12 @@ const inlineImgStyle: React.CSSProperties = { }; export default function AppIcon(props: AppIconProps & AvatarProps): React.ReactElement { - const { name, url, color, sx = {}, ...restProps } = props; + const { name, url, color, sx = {}, variant = "square", ...restProps } = props; return ( - + {["Twitter", "+3", "Github"].map((app) => ( + + ))} + + + <Typography variant="h6" noWrap> {flow?.name} @@ -58,9 +69,9 @@ export default function FlowRow(props: FlowRowProps): React.ReactElement { {isUpdated && formatMessage('flow.updatedAt', { datetime: relativeUpdatedAt })} {!isUpdated && formatMessage('flow.createdAt', { datetime: relativeCreatedAt })} </Typography> - </Stack> + - + - + @@ -83,4 +94,4 @@ export default function FlowRow(props: FlowRowProps): React.ReactElement { />} ); -} \ No newline at end of file +} diff --git a/packages/web/src/components/FlowRow/style.ts b/packages/web/src/components/FlowRow/style.ts index e6260438..e2a7f5be 100644 --- a/packages/web/src/components/FlowRow/style.ts +++ b/packages/web/src/components/FlowRow/style.ts @@ -1,20 +1,42 @@ import { styled } from '@mui/material/styles'; +import MuiStack from '@mui/material/Stack'; +import MuiBox from '@mui/material/Box'; import MuiCardContent from '@mui/material/CardContent'; import MuiTypography from '@mui/material/Typography'; export const CardContent = styled(MuiCardContent)(({ theme }) => ({ display: 'grid', gridTemplateRows: 'auto', - gridTemplateColumns: '1fr auto', - gridColumnGap: theme.spacing(2), + gridTemplateColumns: 'calc(50px * 3 + 8px * 2) minmax(0, auto) min-content', + gridGap: theme.spacing(2), + gridTemplateAreas: ` + "apps title menu" + `, alignItems: 'center', + [theme.breakpoints.down('sm')]: { + gridTemplateAreas: ` + "apps menu" + "title menu" + `, + gridTemplateColumns: 'minmax(0, auto) min-content', + gridTemplateRows: 'auto auto', + } })); +export const Apps = styled(MuiStack)(() => ({ + gridArea: 'apps', +})); +export const Title = styled(MuiStack)(() => ({ + gridArea: 'title', +})); +export const ContextMenu = styled(MuiBox)(() => ({ + gridArea: 'menu', +})); export const Typography = styled(MuiTypography)(() => ({ display: 'inline-block', width: '100%', - maxWidth: '70%', + maxWidth: '85%', })); export const DesktopOnlyBreakline = styled('br')(({ theme }) => ({ diff --git a/packages/web/src/graphql/queries/get-flows.ts b/packages/web/src/graphql/queries/get-flows.ts index 42ded512..d752bebb 100644 --- a/packages/web/src/graphql/queries/get-flows.ts +++ b/packages/web/src/graphql/queries/get-flows.ts @@ -17,4 +17,4 @@ export const GET_FLOWS = gql` } } } -`; \ No newline at end of file +`;