diff --git a/src/BiteConsent.tsx b/src/components/BiteConsent.tsx similarity index 97% rename from src/BiteConsent.tsx rename to src/components/BiteConsent.tsx index 5166514..35fec2a 100644 --- a/src/BiteConsent.tsx +++ b/src/components/BiteConsent.tsx @@ -1,9 +1,9 @@ import { AnimatePresence, motion } from 'framer-motion' import React, { useEffect } from 'react' -import CookieConfig from './CookieConfig' +import CookieConfig from '../config/CookieConfig' import { Cookies } from './Illustrations' -import Position, { CustomPosition, isCustomPosition } from './Position' -import { useTheme } from './ThemeContext' +import Position, { CustomPosition, isCustomPosition } from '../utils/Position' +import { useTheme } from '../context/ThemeContext' const CONSENT_COOKIE_NAME = 'cookie_consent' diff --git a/src/Illustrations.tsx b/src/components/Illustrations.tsx similarity index 100% rename from src/Illustrations.tsx rename to src/components/Illustrations.tsx diff --git a/src/CookieConfig.ts b/src/config/CookieConfig.ts similarity index 100% rename from src/CookieConfig.ts rename to src/config/CookieConfig.ts diff --git a/src/ThemeContext.tsx b/src/context/ThemeContext.tsx similarity index 100% rename from src/ThemeContext.tsx rename to src/context/ThemeContext.tsx diff --git a/src/useBiteConsent.tsx b/src/hooks/useBiteConsent.tsx similarity index 89% rename from src/useBiteConsent.tsx rename to src/hooks/useBiteConsent.tsx index 15904be..2573116 100644 --- a/src/useBiteConsent.tsx +++ b/src/hooks/useBiteConsent.tsx @@ -1,9 +1,9 @@ import React, { useCallback } from 'react' import { createRoot } from 'react-dom/client' -import { BiteConsent, CONSENT_COOKIE_NAME } from './BiteConsent' -import CookieConfig from './CookieConfig' -import Position, { CustomPosition } from './Position' -import ThemeProvider, { Theme } from './ThemeContext' +import { BiteConsent, CONSENT_COOKIE_NAME } from '../components/BiteConsent' +import CookieConfig from '../config/CookieConfig' +import Position, { CustomPosition } from '../utils/Position' +import ThemeProvider, { Theme } from '../context/ThemeContext' const BITE_CONSENT_VIEW_ELEMENT_ID = 'bite-consent-view' diff --git a/src/index.ts b/src/index.ts index c95a26a..8255673 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,6 @@ -import { BiteConsent } from './BiteConsent' -import Position, { CustomPosition } from './Position' -import useBiteConsent from './useBiteConsent' +import { BiteConsent } from './components/BiteConsent' +import Position, { CustomPosition } from './utils/Position' +import useBiteConsent from './hooks/useBiteConsent' export { BiteConsent, CustomPosition, Position, useBiteConsent } + diff --git a/src/Position.ts b/src/utils/Position.ts similarity index 100% rename from src/Position.ts rename to src/utils/Position.ts