You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Application-Web/front/views/component/Title.tsx

32 lines
656 B

export function MainTitle({title, id} : {title : string, id : string|null}) {
let titre;
console.log(id);
if (id==null){
titre = <h3>{title}</h3>;
}
else {
titre = <h3 id={id}>{title}</h3>;
}
return (
<div className="title main-title">
<h2>{title}</h2>
</div>
)
}
export function SecondTitle({title, id} : {title : string, id : string|null}) {
let titre;
if (id==null){
titre = <h3>{title}</h3>;
}
else {
titre = <h3 id={id}>{title}</h3>;
}
return (
<div className="title second-title">
{titre}
</div>
)
}