generated from lucien/actix-react-template
Articles section of the main page
This commit is contained in:
parent
f77b96db25
commit
9562eb98dc
5 changed files with 101 additions and 27 deletions
|
@ -2,16 +2,17 @@ import { ReactNode, MouseEventHandler } from 'react';
|
|||
|
||||
interface ButtonProps {
|
||||
onClick: MouseEventHandler<HTMLButtonElement>;
|
||||
color: 'primary' | 'secondary';
|
||||
children: ReactNode;
|
||||
}
|
||||
|
||||
export default function Button({ onClick, children }: ButtonProps) {
|
||||
export default function Button({ onClick, color, children }: ButtonProps) {
|
||||
return (
|
||||
<button style={{
|
||||
backgroundColor: 'var(--color-lightblue)',
|
||||
backgroundColor: color === 'primary' ? 'var(--color-yellow)' : 'var(--color-darkblue)',
|
||||
borderRadius: '8px',
|
||||
borderWidth: '0',
|
||||
color: 'var(--color-darkblue)',
|
||||
color: color === 'primary' ? 'var(--color-black)' : 'var(--color-white)',
|
||||
cursor: 'pointer',
|
||||
display: 'inline-block',
|
||||
fontFamily: '"Haas Grot Text R Web", "Helvetica Neue", Helvetica, Arial, sans-serif',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue