- Mise à jour de la DA de la main page.

- Ajout de data temporaire pour les articles.
This commit is contained in:
iMax 2024-12-06 04:43:17 +01:00
parent 1de47f3fb8
commit 5bb2ac3f9b
11 changed files with 76 additions and 35 deletions

View file

@ -1,14 +1,14 @@
import { ReactNode, MouseEventHandler } from 'react';
interface ButtonProps {
onClick: MouseEventHandler<HTMLButtonElement>;
color: 'primary' | 'secondary';
children: ReactNode;
url?: string;
}
export default function Button({ onClick, color, children }: ButtonProps) {
export default function Button({ color, children, url }: ButtonProps) {
return (
<button style={{
<a style={{
backgroundColor: color === 'primary' ? 'var(--color-yellow)' : 'var(--color-darkblue)',
borderRadius: '8px',
borderWidth: '0',
@ -29,7 +29,8 @@ export default function Button({ onClick, color, children }: ButtonProps) {
userSelect: 'none',
WebkitUserSelect: 'none',
touchAction: 'manipulation',
}} onClick={onClick} className="ni-button" role="button">{children}</button>
textDecoration: 'none',
}} href={url} className="ni-button" role="button">{children}</a>
)
}