From 4544c365bbe16eeec2faab451faacd553ba64b56 Mon Sep 17 00:00:00 2001 From: Sambo Chea Date: Tue, 17 May 2022 09:05:18 +0700 Subject: [PATCH] Updated --- package.json | 2 +- src/App.tsx | 2 +- src/lib/{components => }/box/index.tsx | 0 src/lib/{components => }/button/index.tsx | 0 src/lib/components/index.tsx | 5 ----- src/lib/index.ts | 6 +++++- src/lib/{components => }/scanner/index.tsx | 0 src/lib/{components => }/skeleton/index.tsx | 0 src/lib/{components => }/slide/index.tsx | 0 src/lib/{components => }/snackbar/index.tsx | 0 vite.config.ts | 1 + 11 files changed, 8 insertions(+), 8 deletions(-) rename src/lib/{components => }/box/index.tsx (100%) rename src/lib/{components => }/button/index.tsx (100%) delete mode 100644 src/lib/components/index.tsx rename src/lib/{components => }/scanner/index.tsx (100%) rename src/lib/{components => }/skeleton/index.tsx (100%) rename src/lib/{components => }/slide/index.tsx (100%) rename src/lib/{components => }/snackbar/index.tsx (100%) diff --git a/package.json b/package.json index da1c64f..23f8767 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cubetiq/muui", - "version": "0.0.1-alpha.4", + "version": "0.0.1-alpha.5", "author": { "name": "Sambo Chea", "email": "sombochea@cubetiqs.com" diff --git a/src/App.tsx b/src/App.tsx index 3ea4c08..47180de 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; import "./App.css"; -import { Button } from "./lib"; +import Button from "./lib/button"; function App() { const [count, setCount] = useState(0); diff --git a/src/lib/components/box/index.tsx b/src/lib/box/index.tsx similarity index 100% rename from src/lib/components/box/index.tsx rename to src/lib/box/index.tsx diff --git a/src/lib/components/button/index.tsx b/src/lib/button/index.tsx similarity index 100% rename from src/lib/components/button/index.tsx rename to src/lib/button/index.tsx diff --git a/src/lib/components/index.tsx b/src/lib/components/index.tsx deleted file mode 100644 index 1dd2cfe..0000000 --- a/src/lib/components/index.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import Button from "./button"; -import Box from "./box"; -import Skeleton from "./skeleton"; - -export { Skeleton, Box, Button }; diff --git a/src/lib/index.ts b/src/lib/index.ts index 40b494c..d1870ec 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -1 +1,5 @@ -export * from "./components"; +import Button from "./button"; +import Box from "./box"; +import Skeleton from "./skeleton"; + +export default { Skeleton, Box, Button }; diff --git a/src/lib/components/scanner/index.tsx b/src/lib/scanner/index.tsx similarity index 100% rename from src/lib/components/scanner/index.tsx rename to src/lib/scanner/index.tsx diff --git a/src/lib/components/skeleton/index.tsx b/src/lib/skeleton/index.tsx similarity index 100% rename from src/lib/components/skeleton/index.tsx rename to src/lib/skeleton/index.tsx diff --git a/src/lib/components/slide/index.tsx b/src/lib/slide/index.tsx similarity index 100% rename from src/lib/components/slide/index.tsx rename to src/lib/slide/index.tsx diff --git a/src/lib/components/snackbar/index.tsx b/src/lib/snackbar/index.tsx similarity index 100% rename from src/lib/components/snackbar/index.tsx rename to src/lib/snackbar/index.tsx diff --git a/vite.config.ts b/vite.config.ts index efbcb35..584066e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -19,6 +19,7 @@ export default defineConfig({ // Provide global variables to use in the UMD build for externalized deps globals: { react: "React", + "react-dom": "ReactDOM", }, }, },