-
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Ryczko <konradryczko1@gmail.com>
- Loading branch information
1 parent
7ab05e7
commit 1a04ef0
Showing
7 changed files
with
33 additions
and
102 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,32 @@ | ||
import React, { forwardRef } from 'react'; | ||
import clsx from 'clsx'; | ||
import { forwardRef, LegacyRef } from 'react'; | ||
import { ButtonProps, ButtonSize, ButtonVariant } from '../Button/Button'; | ||
|
||
export const ButtonLinkVariant = ButtonVariant; | ||
export const ButtonLinkSize = ButtonSize; | ||
|
||
const ButtonLink = forwardRef(function ButtonLink({ | ||
children, | ||
className, | ||
variant = ButtonLinkVariant.SECONDARY, | ||
sizeType = ButtonLinkSize.DEFAULT, | ||
...props | ||
}: ButtonProps & React.HTMLProps<HTMLAnchorElement>) { | ||
return ( | ||
<a | ||
{...props} | ||
className={clsx( | ||
'btn', | ||
variant, | ||
sizeType, | ||
'hover:no-underline', | ||
className | ||
)} | ||
> | ||
{children} | ||
</a> | ||
); | ||
}); | ||
interface ButtonLinkProps extends ButtonProps { | ||
children: React.ReactNode; | ||
onClick?: () => void; | ||
} | ||
|
||
export default ButtonLink; | ||
const ButtonLink = ( | ||
{ | ||
children, | ||
className, | ||
variant = ButtonLinkVariant.SECONDARY, | ||
sizeType = ButtonLinkSize.DEFAULT, | ||
...props | ||
}: ButtonLinkProps, | ||
ref: LegacyRef<HTMLAnchorElement> | ||
) => ( | ||
<a | ||
{...props} | ||
ref={ref} | ||
className={clsx('btn', variant, sizeType, 'hover:no-underline', className)} | ||
> | ||
{children} | ||
</a> | ||
); | ||
|
||
export default forwardRef(ButtonLink); |
This file was deleted.
Oops, something went wrong.