mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 03:31:47 +00:00
FIX: tests
This commit is contained in:
+6
-8
@@ -4,19 +4,15 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
declare module 'react-big-calendar' {
|
||||
declare module 'react-alice-carousel' {
|
||||
import * as React from "react";
|
||||
|
||||
export interface EventObject {
|
||||
item: number;
|
||||
index: number;
|
||||
slide: number;
|
||||
}
|
||||
|
||||
export interface ResponsiveSettings {
|
||||
breakpoint: {
|
||||
items: number;
|
||||
};
|
||||
}
|
||||
export interface ResponsiveSettings {}
|
||||
|
||||
export interface Props {
|
||||
/**
|
||||
@@ -125,5 +121,7 @@ declare module 'react-big-calendar' {
|
||||
autoPlayActionDisabled?: boolean;
|
||||
}
|
||||
|
||||
export default class Carousel extends React.Component<Props> {}
|
||||
class Carousel extends React.PureComponent<Props> {}
|
||||
|
||||
export default Carousel;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import * as AliceCarousel from 'react-alice-carousel';
|
||||
import AliceCarousel, { Props, EventObject, ResponsiveSettings } from 'react-alice-carousel';
|
||||
|
||||
class SimpleAliceCarousel extends React.Component<AliceCarousel.Props> {
|
||||
class SimpleAliceCarousel extends React.Component<Props> {
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
@@ -11,19 +11,19 @@ class SimpleAliceCarousel extends React.Component<AliceCarousel.Props> {
|
||||
}
|
||||
}
|
||||
|
||||
class Gallery extends React.Component<AliceCarousel> {
|
||||
onSlideChange(e: AliceCarousel.EventObject) {
|
||||
class Gallery extends React.Component<Props> {
|
||||
onSlideChange(e: EventObject) {
|
||||
console.log('Item`s position during a change: ', e.item);
|
||||
console.log('Slide`s position during a change: ', e.slide);
|
||||
}
|
||||
|
||||
onSlideChanged(e: AliceCarousel.EventObject) {
|
||||
onSlideChanged(e: EventObject) {
|
||||
console.log('Item`s position after changes: ', e.item);
|
||||
console.log('Slide`s position after changes: ', e.slide);
|
||||
}
|
||||
|
||||
render() {
|
||||
const responsive = {
|
||||
const responsive: ResponsiveSettings = {
|
||||
0: {
|
||||
items: 1
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user