Skip to content

Commit

Permalink
Add styling to Heading component
Browse files Browse the repository at this point in the history
  • Loading branch information
jpellizzari committed Mar 2, 2022
1 parent 1926245 commit bfb57cc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
22 changes: 20 additions & 2 deletions ui/components/Heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,27 @@ type Props = {
};

function Heading({ className, children, level }: Props) {
return React.createElement(`h${level}`, { className }, children);
return (
<div className={className}>
{React.createElement(`h${level}`, { className }, children)}
</div>
);
}

export default styled(Heading).attrs({ className: Heading.name })`
font-size: 20px;
h1 {
font-weight: 600;
font-size: 20px;
line-height: 24px;
}
h2 {
font-size: 20px;
line-height: 24px;
}
h3 {
font-size: 14px;
line-height: 17px;
}
`;
4 changes: 1 addition & 3 deletions ui/components/SourceDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ function SourceDetail({ className, name, info }: Props) {
return (
<div className={className}>
<Flex align wide between>
<div>
<Heading level={2}>{s.name}</Heading>
</div>
<Heading level={2}>{s.name}</Heading>
<div className="page-status">
{ok ? (
<Icon
Expand Down

0 comments on commit bfb57cc

Please sign in to comment.