Skip to content
Snippets Groups Projects
Commit 019f1991 authored by Bernard Roland (Student Com20)'s avatar Bernard Roland (Student Com20)
Browse files

Fixed the ButtonLink hitbox

parent e944abc6
No related branches found
No related tags found
1 merge request!2WIP: Using react
...@@ -6,11 +6,12 @@ import './button.scss'; ...@@ -6,11 +6,12 @@ import './button.scss';
interface Props { interface Props {
children: ReactNode; children: ReactNode;
type?: "button" | "submit" | "reset"; type?: "button" | "submit" | "reset";
className?: string;
} }
export default function Button({children, type}: Props) { export default function Button({children, type, className}: Props) {
return ( return (
<button className="button" type={type}> <button className={"button " + (className || '')} type={type}>
{children} {children}
</button> </button>
); );
......
@use 'styles/settings'; @use 'styles/settings';
.button-link { .button.button-link {
&, &:hover, &:active, &:focus { padding: 0;
color: settings.$white;
a {
display: inline-block;
padding: 14px 50px;
&, &:hover, &:active, &:focus {
color: settings.$white;
}
} }
} }
...@@ -13,10 +13,10 @@ interface Props { ...@@ -13,10 +13,10 @@ interface Props {
export default function ButtonLink({children, href, routing}: Props) { export default function ButtonLink({children, href, routing}: Props) {
return ( return (
<Button> <Button className="button-link">
{ routing { routing
? <Link className="button-link" to={href}>{children}</Link> ? <Link to={href}>{children}</Link>
: <a className="button-link" href={href}>{children}</a> : <a href={href}>{children}</a>
} }
</Button> </Button>
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment