restructure project to use turborepo
This commit is contained in:
parent
670ab793da
commit
90c535ebb2
181 changed files with 18477 additions and 10909 deletions
61
apps/blog/src/pages/Home/ShowMoreButton.tsx
Normal file
61
apps/blog/src/pages/Home/ShowMoreButton.tsx
Normal file
|
@ -0,0 +1,61 @@
|
|||
import { useContext } from "react"
|
||||
import styled from "styled-components"
|
||||
|
||||
import theming from "../../styles/theming"
|
||||
import { globalContext } from "../../globalContext"
|
||||
|
||||
const Button = styled.button`
|
||||
/* size */
|
||||
|
||||
padding: 1rem;
|
||||
|
||||
/* styling */
|
||||
|
||||
display: inline-block;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
border-radius: 0.5rem;
|
||||
|
||||
/* text */
|
||||
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
font-size: 1rem;
|
||||
|
||||
/* colors */
|
||||
|
||||
color: ${(props) =>
|
||||
theming.theme(props.theme.currentTheme, {
|
||||
light: "black",
|
||||
dark: "#CFD0D0",
|
||||
})};
|
||||
background-color: ${(props) =>
|
||||
theming.theme(props.theme.currentTheme, {
|
||||
light: theming.light.backgroundColor2,
|
||||
dark: theming.dark.backgroundColor2,
|
||||
})};
|
||||
|
||||
:hover {
|
||||
background-color: ${(props) =>
|
||||
theming.theme(props.theme.currentTheme, {
|
||||
light: theming.light.backgroundColor0,
|
||||
dark: theming.dark.backgroundColor0,
|
||||
})};
|
||||
}
|
||||
`
|
||||
|
||||
interface Props {
|
||||
action(): void
|
||||
}
|
||||
|
||||
const ShowMoreButton = (props: Props) => {
|
||||
const { globalState } = useContext(globalContext)
|
||||
|
||||
return (
|
||||
<Button onClick={props.action}>
|
||||
{globalState.locale == "en" ? "Show more posts" : "더 많은 포스트 보이기"}
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
|
||||
export default ShowMoreButton
|
Loading…
Add table
Add a link
Reference in a new issue