From 2e1f66471bb002e80a812f3c8f48576addc247c7 Mon Sep 17 00:00:00 2001 From: Tylerian Date: Thu, 17 Oct 2019 17:41:01 +0200 Subject: [PATCH] Refactoring... --- src/{utilities => hooks}/use-styletron-driver.ts | 0 src/{utilities => hooks}/use-styletron.ts | 4 ++-- src/index.ts | 4 ++-- src/utilities/with-styletron.tsx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename src/{utilities => hooks}/use-styletron-driver.ts (100%) rename src/{utilities => hooks}/use-styletron.ts (77%) diff --git a/src/utilities/use-styletron-driver.ts b/src/hooks/use-styletron-driver.ts similarity index 100% rename from src/utilities/use-styletron-driver.ts rename to src/hooks/use-styletron-driver.ts diff --git a/src/utilities/use-styletron.ts b/src/hooks/use-styletron.ts similarity index 77% rename from src/utilities/use-styletron.ts rename to src/hooks/use-styletron.ts index 15da5ef..f032243 100644 --- a/src/utilities/use-styletron.ts +++ b/src/hooks/use-styletron.ts @@ -25,8 +25,8 @@ function useStyletron(): StandardEngine { invariant( engine, - 'No Apollo Client instance can be found. Please ensure that you ' + - 'have called `ApolloProvider` higher up in your tree.' + "No Styletron instance can be found. Please ensure that you " + + "have called \"StyletronProvider\" higher up in your tree." ); return engine!; diff --git a/src/index.ts b/src/index.ts index d44aae3..3a74fb5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -22,11 +22,11 @@ import { import { useStyletron -} from "./utilities/use-styletron"; +} from "./hooks/use-styletron"; import { useStyletronDriver -} from "./utilities/use-styletron-driver"; +} from "./hooks/use-styletron-driver"; import { withStyletron diff --git a/src/utilities/with-styletron.tsx b/src/utilities/with-styletron.tsx index bd8ac97..fd46f5a 100644 --- a/src/utilities/with-styletron.tsx +++ b/src/utilities/with-styletron.tsx @@ -2,7 +2,7 @@ import React from "react"; import { useStyletron -} from "./use-styletron"; +} from "../hooks/use-styletron"; const withStyletron = (Component: any) => (props: any) => { const styletron = useStyletron();