-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#41] apply one line content component
- Loading branch information
1 parent
e7cfb76
commit 80af1a0
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { css, Theme } from "@emotion/react"; | ||
|
||
interface Props { | ||
summary?: string; | ||
highlight?: string; | ||
} | ||
|
||
function OneLineContent({ summary, highlight }: Props) { | ||
return ( | ||
<span css={summaryContent}> | ||
<strong css={strongContent}>{highlight}</strong> | ||
{summary} | ||
</span> | ||
); | ||
} | ||
|
||
export default OneLineContent; | ||
|
||
const summaryContent = css` | ||
margin: 0.5rem 0; | ||
`; | ||
|
||
const strongContent = (theme: Theme) => css` | ||
color: ${theme.color.black}; | ||
font-weight: ${theme.fontWeight.normal}; | ||
`; |