renaming and reorgainizing

This commit is contained in:
Kim, Jimin 2021-09-04 14:40:54 +09:00
parent c6c0269825
commit a671bdb8d5

View file

@ -15,17 +15,13 @@ import {
import { Post } from "../types/typings" import { Post } from "../types/typings"
const StyledTitle = styled.h1` const StyledPostCardContainer = styled(Link)`
font-size: 2rem; text-decoration: none;
font-style: bold;
margin-bottom: 1rem;
`
const StyledMetaContainer = styled.small`
color: ${(props) => color: ${(props) =>
theming.theme(props.theme.currentTheme, { theming.theme(props.theme.currentTheme, {
light: "#555", light: theming.light.color1,
dark: "#CCC", dark: theming.dark.color1,
})}; })};
` `
@ -44,13 +40,17 @@ const StyledPostCard = styled.div`
} }
` `
const StyledPostCardContentContainer = styled(Link)` const StyledTitle = styled.h1`
text-decoration: none; font-size: 2rem;
font-style: bold;
margin-bottom: 1rem;
`
const StyledMetaContainer = styled.small`
color: ${(props) => color: ${(props) =>
theming.theme(props.theme.currentTheme, { theming.theme(props.theme.currentTheme, {
light: theming.light.color1, light: "#555",
dark: theming.dark.color1, dark: "#CCC",
})}; })};
` `
@ -72,7 +72,7 @@ interface PostCardProps {
export default class PostCard extends React.Component<PostCardProps> { export default class PostCard extends React.Component<PostCardProps> {
render() { render() {
return ( return (
<StyledPostCardContentContainer <StyledPostCardContainer
to={process.env.PUBLIC_URL + this.props.postData.url} to={process.env.PUBLIC_URL + this.props.postData.url}
> >
<StyledPostCard <StyledPostCard
@ -126,7 +126,7 @@ export default class PostCard extends React.Component<PostCardProps> {
}} }}
/> />
</StyledPostCard> </StyledPostCard>
</StyledPostCardContentContainer> </StyledPostCardContainer>
) )
} }
} }