mirror of
https://github.com/r-freeman/portfolio.git
synced 2025-04-11 20:54:31 +00:00
Update heading component
All checks were successful
Build And Publish / BuildAndPublish (push) Successful in 3m15s
All checks were successful
Build And Publish / BuildAndPublish (push) Successful in 3m15s
This commit is contained in:
parent
a1943ebbf3
commit
55d34565f2
@ -11,10 +11,9 @@ export function Heading({as: Component = 'h1', children = null}: HeadingProps) {
|
||||
let headingText = children ? children.toString() : ''
|
||||
|
||||
return (
|
||||
<Component id={createSlug(headingText)} className="group">
|
||||
<Component id={createSlug(headingText)} className="flex group">
|
||||
{children}
|
||||
<Link className="ml-1.5 group-hover:visible invisible"
|
||||
href={`#${createSlug(headingText)}`}>#</Link>
|
||||
<Link className="sr-only group-hover:not-sr-only !ml-1.5" href={`#${createSlug(headingText)}`}>#</Link>
|
||||
</Component>
|
||||
)
|
||||
}
|
Loading…
Reference in New Issue
Block a user