✨ Back arrow
This commit is contained in:
parent
af250b8629
commit
34d2ad2bbf
@ -15,11 +15,11 @@ type IProps = {
|
|||||||
variant?: EButtonVariant;
|
variant?: EButtonVariant;
|
||||||
fullwidth?: "true" | "false";
|
fullwidth?: "true" | "false";
|
||||||
icon?: string;
|
icon?: string;
|
||||||
iconStyle?: CSSProperties;
|
iconstyle?: CSSProperties;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
type?: "button" | "submit";
|
type?: "button" | "submit";
|
||||||
isloading?: string;
|
isloading?: string;
|
||||||
iconPosition?: "left" | "right";
|
iconposition?: "left" | "right";
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function Button(props: IProps) {
|
export default function Button(props: IProps) {
|
||||||
@ -29,20 +29,20 @@ export default function Button(props: IProps) {
|
|||||||
type = "button",
|
type = "button",
|
||||||
isloading = "false",
|
isloading = "false",
|
||||||
fullwidth = "false",
|
fullwidth = "false",
|
||||||
iconPosition = "right",
|
iconposition = "right",
|
||||||
onClick,
|
onClick,
|
||||||
children,
|
children,
|
||||||
icon,
|
icon,
|
||||||
iconStyle,
|
iconstyle,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const attributes = { ...props, variant, disabled, type, isloading, fullwidth };
|
const attributes = { ...props, variant, disabled, type, isloading, fullwidth };
|
||||||
delete attributes.icon;
|
delete attributes.icon;
|
||||||
return (
|
return (
|
||||||
<button {...attributes} onClick={onClick} className={classes["root"]} type={type}>
|
<button {...attributes} onClick={onClick} className={classes["root"]} type={type}>
|
||||||
{icon && iconPosition === "left" && <Image src={icon} style={iconStyle} alt={"button icon"} />}
|
{icon && iconposition === "left" && <Image src={icon} style={iconstyle} alt={"button icon"} />}
|
||||||
{children}
|
{children}
|
||||||
{icon && iconPosition === "right" && <Image src={icon} style={iconStyle} alt={"button icon"} />}
|
{icon && iconposition === "right" && <Image src={icon} style={iconstyle} alt={"button icon"} />}
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
28
src/front/Components/Elements/BackArrow/index.tsx
Normal file
28
src/front/Components/Elements/BackArrow/index.tsx
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import Link from "next/link";
|
||||||
|
import React from "react";
|
||||||
|
import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button";
|
||||||
|
import ChevronIcon from "@Assets/icons/chevron.svg";
|
||||||
|
type IProps = {
|
||||||
|
url: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
type IState = {};
|
||||||
|
export default class BackArrow extends React.Component<IProps, IState> {
|
||||||
|
public constructor(props: IProps) {
|
||||||
|
super(props);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override render(): JSX.Element {
|
||||||
|
return (
|
||||||
|
<Link href={this.props.url}>
|
||||||
|
<Button
|
||||||
|
icon={ChevronIcon}
|
||||||
|
iconposition={"left"}
|
||||||
|
iconstyle={{ transform: "rotate(180deg)", width: "22px", height: "22px" }}
|
||||||
|
variant={EButtonVariant.LINE}>
|
||||||
|
Retour
|
||||||
|
</Button>
|
||||||
|
</Link>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -9,9 +9,8 @@ import { ActionMeta, MultiValue } from "react-select";
|
|||||||
import { IOption } from "@Front/Components/DesignSystem/Select";
|
import { IOption } from "@Front/Components/DesignSystem/Select";
|
||||||
import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField";
|
import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField";
|
||||||
import Form from "@Front/Components/DesignSystem/Form";
|
import Form from "@Front/Components/DesignSystem/Form";
|
||||||
import ChevonIcon from "@Assets/icons/chevron.svg";
|
|
||||||
import Link from "next/link";
|
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
|
import BackArrow from "@Front/Components/Elements/BackArrow";
|
||||||
|
|
||||||
type IProps = {
|
type IProps = {
|
||||||
selectedFolderUid: string;
|
selectedFolderUid: string;
|
||||||
@ -45,15 +44,7 @@ class AddClientToFolderClass extends BasePage<IProps, IState> {
|
|||||||
return (
|
return (
|
||||||
<DefaultNotaryDashboard title={"Ajouter client(s)"} onSelectedFolder={this.onSelectedFolder}>
|
<DefaultNotaryDashboard title={"Ajouter client(s)"} onSelectedFolder={this.onSelectedFolder}>
|
||||||
<div className={classes["root"]}>
|
<div className={classes["root"]}>
|
||||||
<Link href={"/dossier/".concat(this.props.selectedFolderUid)}>
|
<BackArrow url={"/dossier/".concat(this.props.selectedFolderUid)} />
|
||||||
<Button
|
|
||||||
icon={ChevonIcon}
|
|
||||||
iconPosition={"left"}
|
|
||||||
iconStyle={{ transform: "rotate(180deg)", width: "22px", height: "22px" }}
|
|
||||||
variant={EButtonVariant.LINE}>
|
|
||||||
Retour
|
|
||||||
</Button>
|
|
||||||
</Link>
|
|
||||||
<Typography typo={ITypo.H1Bis}>Associer un ou plusieurs client(s)</Typography>
|
<Typography typo={ITypo.H1Bis}>Associer un ou plusieurs client(s)</Typography>
|
||||||
<Form>
|
<Form>
|
||||||
<div className={classes["radiobox-container"]}>
|
<div className={classes["radiobox-container"]}>
|
||||||
|
@ -3,6 +3,7 @@ import Typography, { ITypo, ITypoColor } from "@Front/Components/DesignSystem/Ty
|
|||||||
import classes from "./classes.module.scss";
|
import classes from "./classes.module.scss";
|
||||||
import DefaultDoubleSidePage from "@Front/Components/LayoutTemplates/DefaultDoubleSidePage";
|
import DefaultDoubleSidePage from "@Front/Components/LayoutTemplates/DefaultDoubleSidePage";
|
||||||
import RightImage from "@Front/Assets/images/create-folder/right-image.png";
|
import RightImage from "@Front/Assets/images/create-folder/right-image.png";
|
||||||
|
import BackArrow from "@Front/Components/Elements/BackArrow";
|
||||||
|
|
||||||
type IProps = {};
|
type IProps = {};
|
||||||
type IState = {};
|
type IState = {};
|
||||||
@ -16,14 +17,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"]}>
|
||||||
<div className={classes["no-folder-selected"]}>
|
<BackArrow url="/" />
|
||||||
<Typography typo={ITypo.H1Bis}>Informations du dossier</Typography>
|
|
||||||
<div className={classes["choose-a-folder"]}>
|
|
||||||
<Typography typo={ITypo.P_18} color={ITypoColor.GREY}>
|
|
||||||
Veuillez sélectionner un dossier.
|
|
||||||
</Typography>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</DefaultDoubleSidePage>
|
</DefaultDoubleSidePage>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user