From 60348fcce515f115122b10c5efb326f89c057b22 Mon Sep 17 00:00:00 2001 From: Nathan Kluth Date: Thu, 26 Oct 2023 10:15:07 -0600 Subject: [PATCH] mv quantityinput --- packages/nextjs/pages/products/[slug].tsx | 3 +-- .../ProductPage => shared-ui/components}/QuantityInput.tsx | 6 +++--- packages/shared-ui/index.ts | 1 + 3 files changed, 5 insertions(+), 5 deletions(-) rename packages/{nextjs/components/ProductPage => shared-ui/components}/QuantityInput.tsx (88%) diff --git a/packages/nextjs/pages/products/[slug].tsx b/packages/nextjs/pages/products/[slug].tsx index a500d8f..e901d64 100644 --- a/packages/nextjs/pages/products/[slug].tsx +++ b/packages/nextjs/pages/products/[slug].tsx @@ -5,7 +5,7 @@ import { GetServerSideProps, NextPage } from "next"; import { useRouter } from "next/router"; import { AnimatePresence } from "framer-motion"; -import { H6, FadeInOut, BlockContent, Price } from "shared-ui"; +import { H6, FadeInOut, BlockContent, Price, QuantityInput } from "shared-ui"; import { setCachingHeaders } from "utils/setCachingHeaders"; import { isSlug } from "utils/isSlug"; import { SanityType } from "utils/consts"; @@ -15,7 +15,6 @@ import { getProductBySlug } from "utils/getProductBySlug"; import { ImageCarousel } from "components/ImageCarousel"; import { useCart } from "components/CartContext"; import { PageHead } from "components/PageHead"; -import { QuantityInput } from "components/ProductPage/QuantityInput"; import { StyleOptions } from "components/ProductPage/StyleOptions"; import { ProductVariantSelector } from "components/ProductPage/ProductVariantSelector"; import { Product } from "components/Product"; diff --git a/packages/nextjs/components/ProductPage/QuantityInput.tsx b/packages/shared-ui/components/QuantityInput.tsx similarity index 88% rename from packages/nextjs/components/ProductPage/QuantityInput.tsx rename to packages/shared-ui/components/QuantityInput.tsx index f22623c..436a0bf 100644 --- a/packages/nextjs/components/ProductPage/QuantityInput.tsx +++ b/packages/shared-ui/components/QuantityInput.tsx @@ -1,7 +1,7 @@ import { FiPlus } from "react-icons/fi"; -import { Button } from "shared-ui"; -import { H6 } from "shared-ui"; -import { Input } from "shared-ui"; +import { Button } from "./Button/Button"; +import { H6 } from "./Typography"; +import { Input } from "./Input"; interface Props { quantity: string; diff --git a/packages/shared-ui/index.ts b/packages/shared-ui/index.ts index ddb3538..bd49425 100644 --- a/packages/shared-ui/index.ts +++ b/packages/shared-ui/index.ts @@ -11,5 +11,6 @@ export * from "./components/LinkText"; export * from "./components/Modal"; export * from "./components/WeDontSellBreadBanner"; export * from "./components/Price"; +export * from "./components/QuantityInput"; export * from "./components/sanity";