Merge branch 'dev' of https://github.com/smart-chain-fr/leCoffre-front into dev
This commit is contained in:
commit
3a79264f76
@ -1,9 +1,11 @@
|
|||||||
|
import { IDashBoardFolder } from "@Front/Components/LayoutTemplates/DefaultNotaryDashboard";
|
||||||
|
import Link from "next/link";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import classes from "./classes.module.scss";
|
|
||||||
import SearchBar from "../SearchBar";
|
|
||||||
import Button from "../Button";
|
import Button from "../Button";
|
||||||
import FolderList from "../FolderList";
|
import FolderList from "../FolderList";
|
||||||
import { IDashBoardFolder } from "@Front/Components/LayoutTemplates/DefaultNotaryDashboard";
|
import SearchBar from "../SearchBar";
|
||||||
|
import classes from "./classes.module.scss";
|
||||||
|
|
||||||
type IProps = {
|
type IProps = {
|
||||||
folders: IDashBoardFolder[];
|
folders: IDashBoardFolder[];
|
||||||
@ -37,7 +39,9 @@ export default class FolderListContainer extends React.Component<IProps, IState>
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Button fullwidth={"true"}>Créer un dossier</Button>
|
<Link href={"/dossier/creer-dossier"}>
|
||||||
|
<Button fullwidth={true}>Créer un dossier</Button>
|
||||||
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -1,29 +1,45 @@
|
|||||||
import ChevronIcon from "@Assets/Icons/chevron.svg";
|
import ChevronIcon from "@Assets/Icons/chevron.svg";
|
||||||
import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button";
|
import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button";
|
||||||
import Link from "next/link";
|
import { NextRouter, useRouter } from "next/router";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
type IProps = {
|
type IProps = {
|
||||||
url: string;
|
url?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type IPropsClass = IProps & {
|
||||||
|
router: NextRouter;
|
||||||
|
};
|
||||||
type IState = {};
|
type IState = {};
|
||||||
export default class BackArrow extends React.Component<IProps, IState> {
|
class BackArrowClass extends React.Component<IPropsClass, IState> {
|
||||||
public constructor(props: IProps) {
|
public constructor(props: IPropsClass) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
|
this.handleClick = this.handleClick.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override render(): JSX.Element {
|
public override render(): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<Link href={this.props.url}>
|
<Button
|
||||||
<Button
|
icon={ChevronIcon}
|
||||||
icon={ChevronIcon}
|
iconposition={"left"}
|
||||||
iconposition={"left"}
|
iconstyle={{ transform: "rotate(180deg)", width: "22px", height: "22px" }}
|
||||||
iconstyle={{ transform: "rotate(180deg)", width: "22px", height: "22px" }}
|
variant={EButtonVariant.LINE}
|
||||||
variant={EButtonVariant.LINE}>
|
onClick={this.handleClick}>
|
||||||
Retour
|
Retour
|
||||||
</Button>
|
</Button>
|
||||||
</Link>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private handleClick() {
|
||||||
|
if (this.props.url) {
|
||||||
|
this.props.router.push(this.props.url);
|
||||||
|
}
|
||||||
|
this.props.router.back();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function BackArrow(props: IProps) {
|
||||||
|
const router = useRouter();
|
||||||
|
return <BackArrowClass {...props} router={router} />;
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ export default class CreateFolder extends BasePage<IProps, IState> {
|
|||||||
return (
|
return (
|
||||||
<DefaultDoubleSidePage title={"Dossier"} image={RightImage} type="image">
|
<DefaultDoubleSidePage title={"Dossier"} image={RightImage} type="image">
|
||||||
<div className={classes["root"]}>
|
<div className={classes["root"]}>
|
||||||
<BackArrow url="/" />
|
<BackArrow />
|
||||||
<Typography typo={ITypo.H1} color={ITypoColor.BLACK} className={classes["title"]}>
|
<Typography typo={ITypo.H1} color={ITypoColor.BLACK} className={classes["title"]}>
|
||||||
Créer un dossier
|
Créer un dossier
|
||||||
</Typography>
|
</Typography>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user