diff --git a/rollup.config.js b/rollup.config.js index c5d8e76..e2b09e1 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,4 +1,4 @@ -import { terser } from "rollup-plugin-terser"; +import { terser } from 'rollup-plugin-terser'; import typescript from 'rollup-plugin-typescript2'; import pkg from './package.json'; @@ -10,12 +10,9 @@ export default { format: 'cjs', exports: 'named', sourcemap: true, - strict: false - } + strict: false, + }, ], - plugins: [ - typescript(), - terser() - ], - external: ['react', 'react-dom', 'react-motion'] -} \ No newline at end of file + plugins: [typescript(), terser()], + external: ['react', 'react-dom', 'react-motion'], +}; diff --git a/src/Child.tsx b/src/Child.tsx index 11a9d3a..4c20706 100644 --- a/src/Child.tsx +++ b/src/Child.tsx @@ -12,6 +12,6 @@ interface Props { inverted?: boolean; } -const MouseParallaxChild = ({ children }: Props) => (<> {children} ); +const MouseParallaxChild = ({ children }: Props) => <> {children} ; -export default MouseParallaxChild; \ No newline at end of file +export default MouseParallaxChild; diff --git a/src/index.tsx b/src/index.tsx index 46fb749..4d0f391 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,2 +1,2 @@ +export { default as MouseParallaxChild } from './Child'; export { default as MouseParallaxContainer } from './Container'; -export { default as MouseParallaxChild } from './Child'; \ No newline at end of file diff --git a/src/interfaces.ts b/src/interfaces.ts index f8e61a0..daec3df 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -1,7 +1,9 @@ export interface UpdateStyleProps { - container: { x: number, y: number }, - px: { x: number, y: number }, - percentage: { x: number, y: number }; + container: { x: number; y: number }; + px: { x: number; y: number }; + percentage: { x: number; y: number }; } -export type Middleware = ((offsetOfMouseToCenter: UpdateStyleProps) => React.CSSProperties); \ No newline at end of file +export type Middleware = ( + offsetOfMouseToCenter: UpdateStyleProps +) => React.CSSProperties;