Create title component
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
05b685dc2c
commit
ff9e089a48
@ -0,0 +1,11 @@
|
|||||||
|
@import url(../theme/dark.css);
|
||||||
|
|
||||||
|
.main-title h2 {
|
||||||
|
text-align: center;
|
||||||
|
/* font-weight: bold; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
color: var(--main-contrast-color);
|
||||||
|
font-family: var(--font-title);
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
|
||||||
|
|
||||||
|
export function MainTitle({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 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>
|
||||||
|
)
|
||||||
|
}
|
Loading…
Reference in new issue