Adding Sidebar

This commit is contained in:
Belen Curcio
2020-09-30 10:51:53 -03:00
parent 5e115ade3c
commit cafe205808
20 changed files with 205 additions and 30 deletions

View File

@@ -1,5 +1,5 @@
.root {
@apply cursor-pointer inline-flex px-8 py-2 rounded-sm border border-transparent leading-6 text-white bg-black transition ease-in-out duration-150 shadow-sm font-semibold text-center justify-center;
@apply cursor-pointer inline-flex px-10 rounded-sm border border-transparent leading-6 text-white bg-black transition ease-in-out duration-150 shadow-sm font-semibold text-center justify-center uppercase py-4 uppercase text-center;
}
.root:hover {

View File

@@ -0,0 +1,2 @@
.root {
}

View File

@@ -0,0 +1,29 @@
import cn from "classnames";
import React, { FunctionComponent } from "react";
import s from "./Sidebar.module.css";
interface Props {
className?: string;
children?: any;
}
const Sidebar: FunctionComponent<Props> = ({ className, children }) => {
const rootClassName = cn(s.root, className);
return (
<div className={rootClassName}>
<div className="fixed inset-0 overflow-hidden">
<div className="absolute inset-0 overflow-hidden">
<section className="absolute inset-y-0 right-0 pl-10 max-w-full flex sm:pl-16 ">
<div className="w-screen max-w-2xl">
<div className="h-full flex flex-col bg-white shadow-xl overflow-y-scroll">
<div className="flex-1">{children}</div>
</div>
</div>
</section>
</div>
</div>
</div>
);
};
export default Sidebar;

View File

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

View File

@@ -1,4 +1,4 @@
export { default as Button } from "./Button";
export { default as Container } from "./Container";
export { default as Sidebar } from "./Sidebar";
export { default as Logo } from "./Logo";