generated from lucien/actix-react-template
modifié : front/src/components/ClickableLink.tsx
modifié : front/src/components/LogoButton.tsx modifié : front/src/components/RoundButton.tsx Insertion des types pour les composants.
This commit is contained in:
parent
b3d966e0ae
commit
a239d17697
3 changed files with 19 additions and 3 deletions
|
@ -1,4 +1,9 @@
|
|||
export default function ClickableLink({url, text}) {
|
||||
interface ClickableLinkProps {
|
||||
url:string;
|
||||
text:string;
|
||||
}
|
||||
|
||||
export default function ClickableLink({url, text}: ClickableLinkProps) {
|
||||
return (<div>
|
||||
<a href={url}><button style={{
|
||||
backgroundColor: "transparent",
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
export default function LogoButton ({url, logo}) {
|
||||
interface LogoButtonProps {
|
||||
url:string;
|
||||
logo:string
|
||||
}
|
||||
|
||||
export default function LogoButton ({url, logo}: LogoButtonProps) {
|
||||
return (
|
||||
<a href={url}><img src={logo}/></a>
|
||||
)
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
export default function RoundButton({url, bgcolor, text}) {
|
||||
interface RoundButtonProps {
|
||||
url:string;
|
||||
bgcolor:string;
|
||||
text:string;
|
||||
}
|
||||
|
||||
export default function RoundButton({url, bgcolor, text}: RoundButtonProps) {
|
||||
return (<div>
|
||||
<a href={url}><button style={{
|
||||
backgroundColor: bgcolor,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue