Create title component
continuous-integration/drone/push Build is passing Details

DahmaneYanis 1 year ago
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);
}

@ -1,15 +1,10 @@
@import url(../component/main_title.css);
#personal-space {
display: flex;
flex-direction: column;
}
#title-personal-space h2 {
text-align: center;
color: var(--main-contrast-color);
/* font-family: Helvetica;
font-weight: bold; */
}
#body-personal-space {
width: 95%;
/* background-color: #ccc2b7; */

@ -1,5 +1,6 @@
@import url(../template/header.css);
@import url(../theme/dark.css);
@import url(../component/main_title.css);
#body {
background-color: var(--second-color);

@ -3,6 +3,7 @@ import "../style/home/home.css"
// import AccountSvg from "../assets/account.svg?react"
import { Header } from "./template/Header"
import { BASE } from "../Constants"
import { MainTitle } from "./component/Title"
interface Tactic {
id: number
@ -100,19 +101,13 @@ function PersonalSpace({
style={{
width: width + "%",
}}>
<TitlePersonalSpace />
<MainTitle title="Espace Personnel" id={null}/>
<BodyPersonalSpace allTactics={allTactics} />
</div>
)
}
function TitlePersonalSpace() {
return (
<div id="title-personal-space">
<h2>Espace Personnel</h2>
</div>
)
}
function TableData({ allTactics }: { allTactics: Tactic[] }) {
const nbRow = Math.floor(allTactics.length / 3) + 1

@ -1,4 +1,5 @@
import "../style/settings/settings.css"
import { MainTitle } from "./component/Title"
import {Header} from './template/Header'
export default function Settings({username} : {username : string}){
@ -14,19 +15,13 @@ function Body() {
return (
<div id="body">
<div id="content">
<Title/>
<MainTitle title="Paramètres" id={null}/>
<AccountSettings/>
</div>
</div>
)
}
function Title() {
return (
<h1>Paramètres</h1>
)
}
function AccountSettings(){
return (
<div id="account">

@ -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…
Cancel
Save