Skip to content

Commit

Permalink
feat: title to web-link component (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
EduWTR authored Feb 4, 2024
1 parent be9f4c4 commit 2ac089c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions components/button/button-up.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { WebLink } from '@/components/web-link/web-link'
export const ButtonUp = () => {
return (
<WebLink
title='Back to the top'
href='#top'
className='lg:hidden btn btn-circle btn-accent fixed bottom-4 right-4'
target=''>
Expand Down
3 changes: 3 additions & 0 deletions components/web-link/web-link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@ type WebLinkProps = {
href: string
className?: string
target?: string
title?:string
}

export const WebLink = ({
children,
href,
title,
className,
target = '_blank',
}: WebLinkProps) => (
<a
href={href}
title={title}
className={className}
target={target}
rel='noopener noreferrer'>
Expand Down

0 comments on commit 2ac089c

Please sign in to comment.