Skip to content

Commit

Permalink
forgot the project name
Browse files Browse the repository at this point in the history
  • Loading branch information
tomokazu tantaka committed Oct 2, 2024
1 parent f121442 commit 3a44c31
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ const ProjectGridViewItem: FC<ProjectProps> = ({
/>
<CardFooter>
{hasMapOrStoryPublished && <PublishStatus />}
<CardTitleWrapper>
<CardTitle>{project.name}</CardTitle>
</CardTitleWrapper>
<PopupMenu
menu={popupMenu}
label={
Expand Down Expand Up @@ -84,3 +87,21 @@ const PublishStatus = styled("div")(({ theme }) => ({
borderRadius: "50%",
background: theme.publish.main
}));

const CardTitleWrapper = styled("div")(() => ({
flex: 1
}));

const CardTitle = styled("div")(({ theme }) => ({
flex: "1",
padding: `0 ${theme.spacing.smallest + 1}px`,
color: theme.content.main,
fontSize: theme.fonts.sizes.body,
fontWeight: theme.fonts.weight.regular,
display: "-webkit-box",
WebkitBoxOrient: "vertical",
WebkitLineClamp: 1,
overflow: "hidden",
textOverflow: "ellipsis",
cursor: "pointer"
}));
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ const ProjectListViewItem: FC<ProjectProps> = ({
<ProjectImage backgroundImage={project.imageUrl} />
</ActionWrapper>
</ThumbnailCol>
<ProjectNameCol>
<TitleWrapper>{project.name}</TitleWrapper>
</ProjectNameCol>
<TimeCol>
<Typography size="body">{UpdatedAt}</Typography>
</TimeCol>
Expand Down Expand Up @@ -114,3 +117,24 @@ const ActionCol = styled("div")(() => ({
flex: "0 0 10%",
flexShrink: 0
}));

const ProjectNameCol = styled("div")(({ theme }) => ({
display: "flex",
alignItems: "center",
gap: theme.spacing.smallest,
flex: 1,
flexShrink: 0
}));

const TitleWrapper = styled("div")(({ theme }) => ({
padding: `0 ${theme.spacing.smallest + 1}px`,
color: theme.content.main,
cursor: "pointer",
fontSize: theme.fonts.sizes.body,
fontWeight: theme.fonts.weight.regular,
display: "-webkit-box",
WebkitBoxOrient: "vertical",
WebkitLineClamp: 1,
overflow: "hidden",
textOverflow: "ellipsis"
}));

0 comments on commit 3a44c31

Please sign in to comment.