mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Updates and architecture reorder
This commit is contained in:
21
components/Featurebar/Featurebar.module.css
Normal file
21
components/Featurebar/Featurebar.module.css
Normal 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;
|
||||
}
|
26
components/Featurebar/Featurebar.tsx
Normal file
26
components/Featurebar/Featurebar.tsx
Normal 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;
|
1
components/Featurebar/index.ts
Normal file
1
components/Featurebar/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { default } from "./Featurebar";
|
3
components/Layout/Layout.module.css
Normal file
3
components/Layout/Layout.module.css
Normal file
@@ -0,0 +1,3 @@
|
||||
.root {
|
||||
@apply h-full border-indigo-900;
|
||||
}
|
26
components/Layout/Layout.tsx
Normal file
26
components/Layout/Layout.tsx
Normal 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;
|
1
components/Layout/index.ts
Normal file
1
components/Layout/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { default } from "./Layout";
|
@@ -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";
|
||||
|
Reference in New Issue
Block a user