Apply prettier over all files

This commit is contained in:
Luis Alvarez
2020-10-01 20:40:40 -05:00
parent 2314ad760a
commit 0ef6449aff
72 changed files with 648 additions and 652 deletions

View File

@@ -1,14 +1,14 @@
import cn from "classnames";
import s from "./ProductCard.module.css";
import React, { FunctionComponent } from "react";
import { Heart } from "@components/icon";
import cn from 'classnames'
import s from './ProductCard.module.css'
import React, { FunctionComponent } from 'react'
import { Heart } from '@components/icon'
interface Props {
className?: string;
children?: any;
className?: string
children?: any
}
const ProductCard: FunctionComponent<Props> = ({ className }) => {
const rootClassName = cn(s.root, className);
const rootClassName = cn(s.root, className)
return (
<div className={rootClassName}>
<div className="absolute">
@@ -26,7 +26,7 @@ const ProductCard: FunctionComponent<Props> = ({ className }) => {
<div className="bg-violet h-full"></div>
</div>
</div>
);
};
)
}
export default ProductCard;
export default ProductCard

View File

@@ -1 +1 @@
export { default } from "./ProductCard";
export { default } from './ProductCard'

View File

@@ -1,15 +1,15 @@
import cn from "classnames";
import React, { FunctionComponent } from "react";
import s from "./ProductGrid.module.css";
import ProductCard from "@components/ProductCard";
import cn from 'classnames'
import React, { FunctionComponent } from 'react'
import s from './ProductGrid.module.css'
import ProductCard from '@components/ProductCard'
interface Props {
className?: string;
children?: any;
products: [any];
className?: string
children?: any
products: [any]
}
const ProductView: FunctionComponent<Props> = ({ products, className }) => {
const rootClassName = cn(s.root, className);
const rootClassName = cn(s.root, className)
return (
<div className={rootClassName}>
<div className="row-span-2 lg:col-span-2 bg-violet h-full"></div>
@@ -19,7 +19,7 @@ const ProductView: FunctionComponent<Props> = ({ products, className }) => {
<div className="row-span-2 lg:col-span-2 bg-blue h-full"></div>
<div className="row-span-1 lg:col-span-1 bg-cyan"></div>
</div>
);
};
)
}
export default ProductView;
export default ProductView

View File

@@ -1 +1 @@
export { default } from "./ProductGrid";
export { default } from './ProductGrid'

View File

@@ -1,18 +1,18 @@
import cn from "classnames";
import React, { FunctionComponent } from "react";
import s from "./ProductView.module.css";
import { Button } from "@components/ui";
import { Swatch } from "@components/product";
import cn from 'classnames'
import React, { FunctionComponent } from 'react'
import s from './ProductView.module.css'
import { Button } from '@components/ui'
import { Swatch } from '@components/product'
interface Props {
className?: string;
children?: any;
productData: ProductData;
className?: string
children?: any
productData: ProductData
}
const ProductView: FunctionComponent<Props> = ({ productData, className }) => {
const rootClassName = cn(s.root, className);
console.log(productData);
const rootClassName = cn(s.root, className)
console.log(productData)
return (
<div className={rootClassName}>
<div className="absolute">
@@ -53,7 +53,7 @@ const ProductView: FunctionComponent<Props> = ({ productData, className }) => {
</section>
</div>
</div>
);
};
)
}
export default ProductView;
export default ProductView

View File

@@ -1 +1 @@
export { default } from "./ProductView";
export { default } from './ProductView'

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
export { default as Swatch } from "./Swatch";
export { default as ProductView } from "./ProductView";
export { default as ProductCard } from "./ProductCard";
export { default as ProductGrid } from "./ProductGrid";
export { default as Swatch } from './Swatch'
export { default as ProductView } from './ProductView'
export { default as ProductCard } from './ProductCard'
export { default as ProductGrid } from './ProductGrid'

View File

@@ -1,5 +1,5 @@
import { Colors } from "@components/ui/types";
export { Product } from "@lib/bigcommerce";
import { Colors } from '@components/ui/types'
export { Product } from '@lib/bigcommerce'
// export type ProductData = {
// title: string;