Skip to content

Commit

Permalink
Explicitly render children on section title
Browse files Browse the repository at this point in the history
  • Loading branch information
guzart committed Apr 26, 2021
1 parent fb92ac5 commit 020d8ca
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/atoms/section-title/SectionTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ import './SectionTitle.scss'
type Props = HTMLProps<HTMLHeadingElement>

function SectionTitle(props: Props) {
const { className } = props
return <h2 className={`a-sectionTitle ${className || ''}`} {...props}></h2>
const { className, children, ...other } = props
return (
<h2 className={`a-sectionTitle ${className || ''}`} {...other}>
{children}
</h2>
)
}

export default SectionTitle

0 comments on commit 020d8ca

Please sign in to comment.