Format code

master
Hasan Genc 4 years ago
parent b001238d65
commit d746248de3
  1. 1
      __tests__/carousel.spec.tsx
  2. 12
      src/hooks/index.ts
  3. 16
      src/styles/slider/styles.module.css.d.ts
  4. 34
      src/styles/styles.module.css.d.ts

@ -4,7 +4,6 @@ import { Carousel } from '../src/components/carousel';
import { defaultProps } from '../src/components/carousel/defaultProps'; import { defaultProps } from '../src/components/carousel/defaultProps';
import { carouselItemNodes, dynamicCarouselItemNodes } from './__fixtures__/nodes'; import { carouselItemNodes, dynamicCarouselItemNodes } from './__fixtures__/nodes';
import * as helpers from '../src/helpers'; import * as helpers from '../src/helpers';
import { SlideDirection } from '../src/types/carousel';
import * as hooks from '../src/hooks'; import * as hooks from '../src/hooks';
describe('<Carousel />', () => { describe('<Carousel />', () => {

@ -15,9 +15,9 @@ export const useWindowWidthChange = (callBack: (changed: number) => any) => {
}; };
export const usePrevious = <T>(value: T) => { export const usePrevious = <T>(value: T) => {
const ref = useRef<T>(); const ref = useRef<T>();
useEffect(() => { useEffect(() => {
ref.current = value; ref.current = value;
}); });
return ref.current; return ref.current;
} };

@ -1,10 +1,10 @@
export const sliderBase: string export const sliderBase: string;
export const slider: string export const slider: string;
export const sliding: string export const sliding: string;
interface Namespace { interface Namespace {
"sliderBase": string, sliderBase: string;
"slider": string, slider: string;
"sliding": string, sliding: string;
} }
declare const stylesModule: Namespace declare const stylesModule: Namespace;
export default stylesModule export default stylesModule;

@ -1,19 +1,19 @@
export const carouselBase: string export const carouselBase: string;
export const itemProvider: string export const itemProvider: string;
export const itemContainer: string export const itemContainer: string;
export const itemTracker: string export const itemTracker: string;
export const carouselArrow: string export const carouselArrow: string;
interface Namespace { interface Namespace {
"carouselBase": string, carouselBase: string;
"carousel-base": string, 'carousel-base': string;
"itemProvider": string, itemProvider: string;
"item-provider": string, 'item-provider': string;
"itemContainer": string, itemContainer: string;
"item-container": string, 'item-container': string;
"itemTracker": string, itemTracker: string;
"item-tracker": string, 'item-tracker': string;
"carouselArrow": string, carouselArrow: string;
"carousel-arrow": string, 'carousel-arrow': string;
} }
declare const stylesModule: Namespace declare const stylesModule: Namespace;
export default stylesModule export default stylesModule;

Loading…
Cancel
Save