diff --git a/src/components/headings/HeadingSteps.module.css b/src/components/headings/HeadingSteps.module.css new file mode 100644 index 0000000000000000000000000000000000000000..3f9fd99bddec4667b1a70160dbc3e8299815797f --- /dev/null +++ b/src/components/headings/HeadingSteps.module.css @@ -0,0 +1,56 @@ +@import url("../../styles/colors.css"); +@import url("../../assets/fonts/fonts.css"); +:root { + --circle-size: clamp(1.5rem, 5vw, 3rem); + --spacing: clamp(0.25rem, 2vw, 0.5rem); +} + +.heading_five { + color: var(--black-87); + font-family: "Lato-Bold"; + font-size: 0.875rem; + letter-spacing: 0.25px; + line-height: 1.429; + padding-top: 0.3rem; +} + +.heading_prefix_circle { + background-color: var(--white-90); + border-radius: 50%; + color: var(--blue-primary); + font-family: "Montserrat-SemiBold"; + font-size: 1rem; + text-align: center; + padding-top: 0.20rem; + letter-spacing: 0.12px; + line-height: 1.5; + height: 1.875rem; + width: 1.875rem; + border: 1px solid var(--blue-primary); +} + +.stepper { + --size: 3rem; + --spacing: -0.5rem; +} + +.stepper__item { + display: flex; + flex-direction: column; + flex: 1; + text-align: center; +} +.active_step { + background-color:var(--blue-primary); + color: #ffffff; +} +.stepper__item:not(:last-child):after { + content: ""; + position: relative; + top: calc(var(--circle-size) / 3); + width: calc(100% - var(--circle-size) - calc(var(--spacing) * 2)); + left: calc(48% + calc(var(--circle-size) / 2 + var(--spacing))); + height: 2px; + background-color: #e0e0e0; + order: -1; +} \ No newline at end of file diff --git a/src/components/headings/HeadingSteps.tsx b/src/components/headings/HeadingSteps.tsx new file mode 100644 index 0000000000000000000000000000000000000000..3e384b5f8a26ec6d3d1a92f77a3e598dc0160984 --- /dev/null +++ b/src/components/headings/HeadingSteps.tsx @@ -0,0 +1,25 @@ +import styles from "./HeadingSteps.module.css"; + +/** + * HeadingFive component renders + * larger variant of headings with prefix icon + */ + +interface HeadingStepsProps { + stepsData: any; +} + +export const HeadingSteps = ({ stepsData}: HeadingStepsProps) => { +return( + <ul className={`${styles.stepper} d-flex flex-row justify-content-center align-items-center w-100`}> + {stepsData && stepsData.map((i:any) => { + return( + <li className={`${styles.stepper__item} d-flex flex-column justify-content-center align-items-center me-3`}> + <div className={`${styles.heading_prefix_circle} ${i.active?styles.active_step:''}`}>{i.count}</div> + <div className={`${styles.heading_five}`}>{i.label}</div> + </li> + ) + })} + </ul> +) +}; diff --git a/src/components/headings/index.ts b/src/components/headings/index.ts index 214ff41f79577b807cb57b3e671facc089ff6e64..58f93e47eeff9f7ddcdb4031e72657cc58b08001 100644 --- a/src/components/headings/index.ts +++ b/src/components/headings/index.ts @@ -2,3 +2,4 @@ export { HeadingOne } from "./HeadingOne"; export { HeadingTwo } from "./HeadingTwo"; export { HeadingFour } from "./HeadingFour"; export { HeadingFive } from "./HeadingFive"; +export { HeadingSteps } from "./HeadingSteps"; diff --git a/src/components/modal/InspectionScheduleModal.tsx b/src/components/modal/InspectionScheduleModal.tsx index 955147c472f7676dd975fde8c86010fda2b4edd2..98979543c6b232514418faba446a8c6a7d9190f7 100644 --- a/src/components/modal/InspectionScheduleModal.tsx +++ b/src/components/modal/InspectionScheduleModal.tsx @@ -5,7 +5,7 @@ import btnStyle from "../buttons/BtnOne.module.css"; import btnStyleTwo from "../buttons/BtnTwo.module.css"; import { SelectField, TextField } from "../form-elements"; import { BtnOne } from "../buttons"; -import { HeadingFive } from "../headings"; +import { HeadingFive, HeadingSteps } from "../headings"; import moment from "moment"; import { APP, LANG } from "../../constants"; import { ReviewService } from "../../services"; @@ -63,6 +63,15 @@ export const InspectionScheduleModal = ({ const [disableSubmit, setDisableSubmit] = useState(true); let history = useHistory(); + let stepsData = [{ + label:'Schedule the inspection', + count: 1, + active: true + },{ + label:'Schedule the inspection', + count: 2, + active: false + }] useEffect(() => { ReviewService.getAllInspectors().then( @@ -384,12 +393,13 @@ export const InspectionScheduleModal = ({ <div className="modal-dialog modal-lg"> <div className={`${styles.custom_model_content} modal-content`}> <div className={`${styles.custom_modal_footer} modal-header`}> - <h5 + {/* <h5 className={`${styles.custom_modal_title} modal-title`} id="staticBackdropLabel" > {heading} - </h5> + </h5> */} + <HeadingSteps stepsData={stepsData}></HeadingSteps> </div> {/* Body */}