mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-17 19:52:23 +08:00
Add support for null in RenderControl type
Allow null to completely disable default controls.
This commit is contained in:
committed by
Rémi Chanaud
parent
085e63ecf0
commit
01306ebd53
2
types/nuka-carousel/index.d.ts
vendored
2
types/nuka-carousel/index.d.ts
vendored
@@ -64,7 +64,7 @@ export interface SlideRenderControlProps {
|
||||
goToSlide: (index: number) => void;
|
||||
}
|
||||
|
||||
export type RenderControl = (props: SlideRenderControlProps) => JSX.Element;
|
||||
export type RenderControl = (props: SlideRenderControlProps) => JSX.Element | null;
|
||||
|
||||
export interface CarouselProps {
|
||||
/**
|
||||
|
||||
@@ -25,7 +25,7 @@ const props: CarouselProps = {
|
||||
renderCenterCenterControls: () => <button />,
|
||||
renderCenterRightControls: () => <button />,
|
||||
renderBottomLeftControls: () => <button />,
|
||||
renderBottomCenterControls: () => <button />,
|
||||
renderBottomCenterControls: () => null,
|
||||
renderBottomRightControls: () => <button />,
|
||||
slideIndex: 2,
|
||||
slidesToScroll: 'auto',
|
||||
|
||||
Reference in New Issue
Block a user