Skip to content

Commit 658d369

Browse files
authored
fix: Update typings to include trayProps (#303)
* Update typings to include trayProps This prop is supported by Slider but is not included in typings * Add html div props to SliderProps This is supported based on documentation: Any remaining props not consumed by the component are passed directly to the root element of a component unless otherwise noted in that component's documentation * Update carouselElements.d.ts
1 parent d7dd738 commit 658d369

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

typings/carouselElements.d.ts

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react'
22

3-
interface SliderProps {
3+
interface SliderProps extends React.HTMLAttributes<HTMLDivElement> {
44
readonly children: React.ReactNode
55
readonly className?: string
66
readonly classNameAnimation?: string
@@ -11,6 +11,7 @@ interface SliderProps {
1111
readonly style?: {}
1212
readonly spinner?: () => void
1313
readonly trayTag?: string
14+
readonly trayProps?: React.HTMLAttributes<HTMLUListElement>
1415
}
1516
type SliderInterface = React.ComponentClass<SliderProps>
1617
/**
@@ -20,7 +21,7 @@ declare const Slider: SliderInterface
2021

2122

2223

23-
interface SlideProps {
24+
interface SlideProps extends React.HTMLAttributes<HTMLDivElement> {
2425
readonly className?: string
2526
readonly classNameHidden?: string
2627
readonly classNameVisible?: string
@@ -60,7 +61,7 @@ declare const ImageWithZoom: ImageWithZoomInterface
6061

6162

6263

63-
interface ImageProps {
64+
interface ImageProps extends React.HTMLAttributes<HTMLDivElement> {
6465
readonly alt?: string
6566
readonly children?: React.ReactNode
6667
readonly className?: string
@@ -90,7 +91,7 @@ interface RenderDotsProps {
9091

9192
type RenderDotsFunction = (props: RenderDotsProps) => void
9293

93-
interface DotGroupProps {
94+
interface DotGroupProps extends React.HTMLAttributes<HTMLDivElement> {
9495
readonly children?: React.ReactNode
9596
readonly className?: string
9697
readonly dotNumbers?: boolean
@@ -109,7 +110,7 @@ declare const DotGroup: DotGroupInterface
109110

110111

111112

112-
interface DotProps {
113+
interface DotProps extends React.HTMLAttributes<HTMLDivElement> {
113114
readonly children?: React.ReactChild
114115
readonly className?: string
115116
readonly disabled?: boolean
@@ -124,7 +125,7 @@ declare const Dot: DotInterface
124125

125126

126127

127-
interface ButtonNextProps {
128+
interface ButtonNextProps extends React.HTMLAttributes<HTMLButtonElement> {
128129
readonly children: React.ReactChild
129130
readonly className?: string
130131
readonly disabled?: boolean
@@ -138,7 +139,7 @@ declare const ButtonNext: ButtonNextInterface
138139

139140

140141

141-
interface ButtonBackProps {
142+
interface ButtonBackProps extends React.HTMLAttributes<HTMLButtonElement> {
142143
readonly children: React.ReactChild
143144
readonly className?: string
144145
readonly disabled?: boolean
@@ -152,7 +153,7 @@ declare const ButtonBack: ButtonBackInterface
152153

153154

154155

155-
interface ButtonLastProps {
156+
interface ButtonLastProps extends React.HTMLAttributes<HTMLButtonElement> {
156157
readonly children: React.ReactChild
157158
readonly className?: string
158159
readonly disabled?: boolean
@@ -166,7 +167,7 @@ declare const ButtonLast: ButtonLastInterface
166167

167168

168169

169-
interface ButtonFirstProps {
170+
interface ButtonFirstProps extends React.HTMLAttributes<HTMLButtonElement> {
170171
readonly children: React.ReactChild
171172
readonly className?: string
172173
readonly disabled?: boolean
@@ -180,7 +181,7 @@ declare const ButtonFirst: ButtonLastInterface
180181

181182

182183

183-
interface ButtonPlayProps {
184+
interface ButtonPlayProps extends React.HTMLAttributes<HTMLButtonElement> {
184185
readonly childrenPaused?: React.ReactNode
185186
readonly childrenPlaying?: React.ReactNode
186187
readonly className?: string

0 commit comments

Comments
 (0)