From d0593f223e60b82c55ce3a48c024e5627c7ba5ac Mon Sep 17 00:00:00 2001 From: Devin Fee Date: Thu, 13 Jun 2019 22:29:36 -0700 Subject: [PATCH] moved extensions to category folders, added exports --- .../__snapshots__/index.test.ts.snap | 27 +++++++++++++++++++ .../__docs__/badge.docs.mdx | 0 .../__docs__/tooltip.docs.mdx | 0 src/elements/index.ts | 1 + .../page-loader/__docs__/page-loader.docs.mdx | 0 .../__docs__/simple-page-loader-manager.tsx | 0 .../__tests__/page-loader.test.tsx | 2 +- .../page-loader/index.ts | 0 .../page-loader/page-loader.tsx | 0 src/extensions/index.ts | 2 -- .../divider/__docs__/divider.docs.mdx | 4 +-- .../divider/__tests__/divider.test.tsx | 2 +- .../divider/divider.tsx | 0 src/{extensions => layout}/divider/index.ts | 0 src/layout/index.ts | 1 + 15 files changed, 33 insertions(+), 6 deletions(-) rename src/{extensions => base}/__docs__/badge.docs.mdx (100%) rename src/{extensions => base}/__docs__/tooltip.docs.mdx (100%) rename src/{extensions => elements}/page-loader/__docs__/page-loader.docs.mdx (100%) rename src/{extensions => elements}/page-loader/__docs__/simple-page-loader-manager.tsx (100%) rename src/{extensions => elements}/page-loader/__tests__/page-loader.test.tsx (97%) rename src/{extensions => elements}/page-loader/index.ts (100%) rename src/{extensions => elements}/page-loader/page-loader.tsx (100%) delete mode 100644 src/extensions/index.ts rename src/{extensions => layout}/divider/__docs__/divider.docs.mdx (96%) rename src/{extensions => layout}/divider/__tests__/divider.test.tsx (97%) rename src/{extensions => layout}/divider/divider.tsx (100%) rename src/{extensions => layout}/divider/index.ts (100%) diff --git a/src/__tests__/__snapshots__/index.test.ts.snap b/src/__tests__/__snapshots__/index.test.ts.snap index efabedb5..d7c3a366 100644 --- a/src/__tests__/__snapshots__/index.test.ts.snap +++ b/src/__tests__/__snapshots__/index.test.ts.snap @@ -259,6 +259,20 @@ Object { }, "render": [Function], }, + "Divider": Object { + "$$typeof": Symbol(react.forward_ref), + "defaultProps": Object { + "as": "div", + "children": "", + }, + "displayName": "Divider", + "propTypes": Object { + "children": [Function], + "color": [Function], + "vertical": [Function], + }, + "render": [Function], + }, "Dropdown": Object { "$$typeof": Symbol(react.forward_ref), "Container": [Function], @@ -993,6 +1007,19 @@ Object { "displayName": "Numeric", "render": [Function], }, + "PageLoader": Object { + "$$typeof": Symbol(react.forward_ref), + "defaultProps": Object { + "as": "div", + }, + "displayName": "PageLoader", + "propTypes": Object { + "active": [Function], + "color": [Function], + "direction": [Function], + }, + "render": [Function], + }, "Pagination": Object { "$$typeof": Symbol(react.forward_ref), "Ellipsis": Object { diff --git a/src/extensions/__docs__/badge.docs.mdx b/src/base/__docs__/badge.docs.mdx similarity index 100% rename from src/extensions/__docs__/badge.docs.mdx rename to src/base/__docs__/badge.docs.mdx diff --git a/src/extensions/__docs__/tooltip.docs.mdx b/src/base/__docs__/tooltip.docs.mdx similarity index 100% rename from src/extensions/__docs__/tooltip.docs.mdx rename to src/base/__docs__/tooltip.docs.mdx diff --git a/src/elements/index.ts b/src/elements/index.ts index a1bcf090..35f6c064 100644 --- a/src/elements/index.ts +++ b/src/elements/index.ts @@ -19,6 +19,7 @@ export { Icon } from "./icon"; export { Image } from "./image"; export { Notification } from "./notification"; export { Block, Delete, Heading, Highlight, Loader, Numeric } from "./other"; +export { PageLoader } from "./page-loader"; export { Progress } from "./progress"; export { Table } from "./table"; export { Tag } from "./tag"; diff --git a/src/extensions/page-loader/__docs__/page-loader.docs.mdx b/src/elements/page-loader/__docs__/page-loader.docs.mdx similarity index 100% rename from src/extensions/page-loader/__docs__/page-loader.docs.mdx rename to src/elements/page-loader/__docs__/page-loader.docs.mdx diff --git a/src/extensions/page-loader/__docs__/simple-page-loader-manager.tsx b/src/elements/page-loader/__docs__/simple-page-loader-manager.tsx similarity index 100% rename from src/extensions/page-loader/__docs__/simple-page-loader-manager.tsx rename to src/elements/page-loader/__docs__/simple-page-loader-manager.tsx diff --git a/src/extensions/page-loader/__tests__/page-loader.test.tsx b/src/elements/page-loader/__tests__/page-loader.test.tsx similarity index 97% rename from src/extensions/page-loader/__tests__/page-loader.test.tsx rename to src/elements/page-loader/__tests__/page-loader.test.tsx index a89db4d6..e3a2a12f 100644 --- a/src/extensions/page-loader/__tests__/page-loader.test.tsx +++ b/src/elements/page-loader/__tests__/page-loader.test.tsx @@ -4,7 +4,7 @@ import { DEFAULTS } from "src/base/helpers/variables"; import { PAGE_LOADER_DEFAULTS, PageLoader, -} from "src/extensions/page-loader/page-loader"; +} from "src/elements/page-loader/page-loader"; import { hasProperties, diff --git a/src/extensions/page-loader/index.ts b/src/elements/page-loader/index.ts similarity index 100% rename from src/extensions/page-loader/index.ts rename to src/elements/page-loader/index.ts diff --git a/src/extensions/page-loader/page-loader.tsx b/src/elements/page-loader/page-loader.tsx similarity index 100% rename from src/extensions/page-loader/page-loader.tsx rename to src/elements/page-loader/page-loader.tsx diff --git a/src/extensions/index.ts b/src/extensions/index.ts deleted file mode 100644 index ba9b1cef..00000000 --- a/src/extensions/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { Divider } from "./divider"; -export { PageLoader } from "./page-loader"; diff --git a/src/extensions/divider/__docs__/divider.docs.mdx b/src/layout/divider/__docs__/divider.docs.mdx similarity index 96% rename from src/extensions/divider/__docs__/divider.docs.mdx rename to src/layout/divider/__docs__/divider.docs.mdx index b7ed20f9..0cd2fd64 100644 --- a/src/extensions/divider/__docs__/divider.docs.mdx +++ b/src/layout/divider/__docs__/divider.docs.mdx @@ -1,7 +1,7 @@ --- name: Divider -menu: Extensions -route: /extensions/divider +menu: Layout +route: /layout/divider --- import { Playground } from "docz"; diff --git a/src/extensions/divider/__tests__/divider.test.tsx b/src/layout/divider/__tests__/divider.test.tsx similarity index 97% rename from src/extensions/divider/__tests__/divider.test.tsx rename to src/layout/divider/__tests__/divider.test.tsx index 63860173..fadfa15d 100644 --- a/src/extensions/divider/__tests__/divider.test.tsx +++ b/src/layout/divider/__tests__/divider.test.tsx @@ -1,7 +1,7 @@ import React from "react"; import { DEFAULTS } from "src/base/helpers/variables"; -import { Divider } from "src/extensions/divider/divider"; +import { Divider } from "src/layout/divider/divider"; import { hasProperties, diff --git a/src/extensions/divider/divider.tsx b/src/layout/divider/divider.tsx similarity index 100% rename from src/extensions/divider/divider.tsx rename to src/layout/divider/divider.tsx diff --git a/src/extensions/divider/index.ts b/src/layout/divider/index.ts similarity index 100% rename from src/extensions/divider/index.ts rename to src/layout/divider/index.ts diff --git a/src/layout/index.ts b/src/layout/index.ts index c648de85..570352e8 100644 --- a/src/layout/index.ts +++ b/src/layout/index.ts @@ -1,3 +1,4 @@ +export { Divider } from "./divider"; export { Footer } from "./footer"; export { Hero } from "./hero"; export { Section } from "./section";