Skip to content

Commit

Permalink
[#41] apply one line content component
Browse files Browse the repository at this point in the history
  • Loading branch information
hanseulhee committed Jul 30, 2022
1 parent e7cfb76 commit 80af1a0
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/components/Text/OneLineContent.tsx
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};
`;

0 comments on commit 80af1a0

Please sign in to comment.