mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
refactor: import react-slick instead of require (#22507)
* refactor: import react-slick instead of require close #22501 * Update index.tsx
This commit is contained in:
parent
011cac4414
commit
e2a9ab4204
@ -1,15 +1,9 @@
|
||||
import * as React from 'react';
|
||||
import debounce from 'lodash/debounce';
|
||||
import { Settings } from '@ant-design/react-slick';
|
||||
import SlickCarousel, { Settings } from '@ant-design/react-slick';
|
||||
import classNames from 'classnames';
|
||||
import { ConfigConsumer, ConfigConsumerProps } from '../config-provider';
|
||||
|
||||
// Use require over import (will be lifted up)
|
||||
// make sure matchMedia polyfill run before require('react-slick')
|
||||
// Fix https://github.com/ant-design/ant-design/issues/6560
|
||||
// Fix https://github.com/ant-design/ant-design/issues/3308
|
||||
const SlickCarousel = require('@ant-design/react-slick').default;
|
||||
|
||||
export type CarouselEffect = 'scrollx' | 'fade';
|
||||
export type DotPosition = 'top' | 'bottom' | 'left' | 'right';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user