Skip to content

Commit

Permalink
feat(home): HomePageContainer 를 styled 기반으로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
innocarpe committed Sep 8, 2023
1 parent 732048a commit 07d2697
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
27 changes: 22 additions & 5 deletions apps/react-world/src/components/home/HomePageContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
interface HomePageContainerProps {
children: React.ReactNode;
}
import { PropsWithChildren } from 'react';
import styled from '@emotion/styled';

const HomePageContainer: React.FC<HomePageContainerProps> = ({ children }) => {
return <div className="home-page">{children}</div>;
type ContainerProps = PropsWithChildren;

export const HomePageContainer = ({ children }: ContainerProps) => {
return <Container>{children}</Container>;
};

const Container = styled.div`
&.home-page .feed-toggle {
margin-bottom: -1px;
}
&.home-page .sidebar {
padding: 5px 10px 10px 10px;
background: #f3f3f3;
border-radius: 4px;
}
&.home-page .sidebar p {
margin-bottom: 0.2rem;
}
`;

export default HomePageContainer;
10 changes: 0 additions & 10 deletions apps/react-world/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -5204,16 +5204,6 @@ footer {
.btn .counter {
font-size: 0.8rem !important; }

.home-page .feed-toggle {
margin-bottom: -1px; }

.home-page .sidebar {
padding: 5px 10px 10px 10px;
background: #f3f3f3;
border-radius: 4px; }
.home-page .sidebar p {
margin-bottom: 0.2rem; }

.article-page .banner {
padding: 2rem 0 2rem 0; }
.article-page .banner h1 {
Expand Down

0 comments on commit 07d2697

Please sign in to comment.