From cdbff2d4bf982a945a433862ef77ea5a6dc5e489 Mon Sep 17 00:00:00 2001 From: unix Date: Sat, 25 Apr 2020 20:06:40 +0800 Subject: [PATCH] feat(utils): export utils hooks --- components/index.ts | 1 + components/utils/index.ts | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/components/index.ts b/components/index.ts index ff434b4..4fa7c7a 100644 --- a/components/index.ts +++ b/components/index.ts @@ -1,6 +1,7 @@ /// export * from './styles/themes' +export { default as Utils } from './utils/index' export { default as useTheme } from './styles/use-theme' export { default as ZEITUIProvider } from './providers/zeit-ui-provider' export { default as useToasts } from './toast' diff --git a/components/utils/index.ts b/components/utils/index.ts index e69de29..7d577df 100644 --- a/components/utils/index.ts +++ b/components/utils/index.ts @@ -0,0 +1,21 @@ +import { default as useBodyScroll } from './use-body-scroll' +import { default as useClickAnywhere } from './use-click-anywhere' +import { default as useClickAway } from './use-click-away' +import { default as useClipboard } from './use-clipboard' +import { default as useCurrentState } from './use-current-state' +import { default as useRealShape } from './use-real-shape' +import { default as useResize } from './use-resize' +import { default as useSSR } from './use-ssr' +import { default as withDefaults } from './with-defaults' + +export default { + withDefaults, + useBodyScroll, + useClickAnywhere, + useClickAway, + useClipboard, + useCurrentState, + useRealShape, + useResize, + useSSR, +}