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

@@ -0,0 +1,25 @@
.root {
@apply h-12 w-12 bg-white rounded-full mr-3 border border-gray-200 inline-flex items-center justify-center cursor-pointer transition duration-75 ease-in-out;
}
.active,
.root:hover {
@apply border-gray-700;
}
.colorViolet {
@apply bg-violet;
}
.colorPink {
@apply bg-pink;
}
.colorBlack {
@apply bg-black;
}
.colorWhite,
.size {
@apply bg-white;
}

View File

@@ -0,0 +1,35 @@
import cn from "classnames";
import React, { FunctionComponent } from "react";
import s from "./Swatch.module.css";
import { Colors } from "@components/types";
interface Props {
className?: string;
children?: any;
active?: boolean;
color?: Colors;
size?: string;
}
const Swatch: FunctionComponent<Props> = ({
className,
size,
color,
active,
}) => {
const rootClassName = cn(
s.root,
{
[s.active]: active,
[s.size]: size,
[s.colorPink]: color === "pink",
[s.colorWhite]: color === "white",
[s.colorBlack]: color === "black",
[s.colorViolet]: color === "violet",
},
className
);
return <span className={rootClassName}>{size ? size : null}</span>;
};
export default Swatch;

View File

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