-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(home): HomePageContainer 를 styled 기반으로 변경
- Loading branch information
1 parent
a4e436c
commit d2e9f15
Showing
2 changed files
with
22 additions
and
15 deletions.
There are no files selected for viewing
27 changes: 22 additions & 5 deletions
27
apps/react-world/src/components/home/HomePageContainer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters