Skip to content

Commit

Permalink
Eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
brmzkw committed Oct 4, 2021
1 parent 11b12e1 commit 687552b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions components/ButtonLink.jsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
import React from 'react';
import PropTypes from 'prop-types';

const ButtonLink = React.forwardRef(({ onClick, children, variant }, ref) => {
return (
<button onClick={onClick} className={`fr-btn ${variant === "secondary" ? "fr-btn--secondary" : ""}`}>
const ButtonLink = React.forwardRef(
({ onClick, children, variant }, ref) => (
<button type="button" onClick={onClick} ref={ref} className={`fr-btn ${variant === "secondary" ? "fr-btn--secondary" : ""}`}>
{ children }
</button>
);
});
),
);

ButtonLink.defaultProps = {
onClick: null,
variant: "primary",
};

ButtonLink.propTypes = {
onClick: PropTypes.func.isRequired,
onClick: PropTypes.func,
children: PropTypes.node.isRequired,
variant: PropTypes.string,
};
Expand Down
4 changes: 2 additions & 2 deletions layouts/BaseLayout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function Header() {
</a>
</div>
<div className="fr-header__navbar">
<button className="fr-btn--menu fr-btn" data-fr-opened="false" aria-controls="modal-menu" aria-haspopup="menu" title="Menu">
<button className="fr-btn--menu fr-btn" data-fr-opened="false" aria-controls="modal-menu" aria-haspopup="menu" title="Menu" type="button">
Menu
</button>
</div>
Expand All @@ -54,7 +54,7 @@ function Header() {

<div className="fr-header__menu fr-modal" id="modal-menu" aria-labelledby="button-825">
<div className="fr-container">
<button className="fr-link--close fr-link" aria-controls="modal-menu">Fermer</button>
<button className="fr-link--close fr-link" aria-controls="modal-menu" type="button">Fermer</button>
<div className="fr-header__menu-links" />

<nav className="fr-nav" role="navigation" aria-label="Menu principal" id="header-navigation">
Expand Down

0 comments on commit 687552b

Please sign in to comment.