Updates and architecture reorder

This commit is contained in:
Belen Curcio
2020-09-29 19:13:06 -03:00
parent 702f00933d
commit 7c890c7587
10 changed files with 51 additions and 36 deletions

View File

@@ -0,0 +1,21 @@
.root {
@apply py-4 px-6 bg-black text-white flex flex-row justify-center items-center;
}
.title {
@apply text-white font-medium;
}
.separator {
@apply mx-3 bg-white;
width: 1px;
height: 20px;
}
.separator:before {
content: "";
}
.description {
@apply text-white font-medium;
}

View File

@@ -0,0 +1,26 @@
import cn from "classnames";
import { FunctionComponent } from "react";
import s from "./Featurebar.module.css";
interface Props {
className?: string;
title: string;
description: string;
}
const Featurebar: FunctionComponent<Props> = ({
title,
description,
className,
}) => {
const rootClassName = cn(s.root, className);
return (
<div className={rootClassName}>
<span className={s.title}>{title}</span>
<span className={s.separator} />
<span className={s.description}>{description}</span>
</div>
);
};
export default Featurebar;

View File

@@ -0,0 +1 @@
export { default } from "./Featurebar";

View File

@@ -0,0 +1,3 @@
.root {
@apply h-full border-indigo-900;
}

View File

@@ -0,0 +1,26 @@
import cn from "classnames";
import React, { FunctionComponent } from "react";
import s from "./Layout.module.css";
import { Navbar, Featurebar } from "components";
import { Container } from "ui";
interface Props {
className?: string;
children?: any;
}
const Layout: FunctionComponent<Props> = ({ className, children }) => {
const rootClassName = cn(s.root, className);
return (
<Container className={rootClassName}>
<Featurebar
title="Free Standard Shipping on orders over $99.99"
description="Due to COVID-19, some orders may experience processing and delivery delays."
/>
<Navbar />
<main className="h-screen">{children}</main>
</Container>
);
};
export default Layout;

View File

@@ -0,0 +1 @@
export { default } from "./Layout";

View File

@@ -3,3 +3,5 @@ export { default as Footer } from "./Footer";
export { default as Navbar } from "./Navbar";
export { default as Searchbar } from "./Searchbar";
export { default as ProductView } from "./ProductView";
export { default as Layout } from "./Layout";
export { default as Featurebar } from "./Featurebar";