generated from lucien/actix-react-template
Make a better article section and add the article page.
This commit is contained in:
parent
9562eb98dc
commit
e121090433
7 changed files with 111 additions and 26 deletions
34
front/src/components/ButtonLink.tsx
Normal file
34
front/src/components/ButtonLink.tsx
Normal file
|
@ -0,0 +1,34 @@
|
|||
interface ButtonLinkProps {
|
||||
url: string;
|
||||
color: 'primary' | 'secondary';
|
||||
text: string;
|
||||
}
|
||||
|
||||
export default function Button({ url, color, text }: ButtonLinkProps) {
|
||||
return (
|
||||
<a style={{
|
||||
backgroundColor: color === 'primary' ? 'var(--color-yellow)' : 'var(--color-darkblue)',
|
||||
borderRadius: '8px',
|
||||
borderWidth: '0',
|
||||
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',
|
||||
fontSize: '14px',
|
||||
fontWeight: '500',
|
||||
lineHeight: '20px',
|
||||
listStyle: 'none',
|
||||
margin: '0',
|
||||
padding: '10px 12px',
|
||||
textAlign: 'center',
|
||||
transition: 'all 200ms',
|
||||
verticalAlign: 'baseline',
|
||||
whiteSpace: 'nowrap',
|
||||
userSelect: 'none',
|
||||
WebkitUserSelect: 'none',
|
||||
touchAction: 'manipulation',
|
||||
textDecoration: 'none',
|
||||
}} href={url} className="ni-button">{text}</a>
|
||||
)
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue