Skip to content

Commit

Permalink
fix: Update typings to include trayProps (#303)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
taurheim authored Sep 29, 2020
1 parent d7dd738 commit 658d369
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions typings/carouselElements.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'

interface SliderProps {
interface SliderProps extends React.HTMLAttributes<HTMLDivElement> {
readonly children: React.ReactNode
readonly className?: string
readonly classNameAnimation?: string
Expand All @@ -11,6 +11,7 @@ interface SliderProps {
readonly style?: {}
readonly spinner?: () => void
readonly trayTag?: string
readonly trayProps?: React.HTMLAttributes<HTMLUListElement>
}
type SliderInterface = React.ComponentClass<SliderProps>
/**
Expand All @@ -20,7 +21,7 @@ declare const Slider: SliderInterface



interface SlideProps {
interface SlideProps extends React.HTMLAttributes<HTMLDivElement> {
readonly className?: string
readonly classNameHidden?: string
readonly classNameVisible?: string
Expand Down Expand Up @@ -60,7 +61,7 @@ declare const ImageWithZoom: ImageWithZoomInterface



interface ImageProps {
interface ImageProps extends React.HTMLAttributes<HTMLDivElement> {
readonly alt?: string
readonly children?: React.ReactNode
readonly className?: string
Expand Down Expand Up @@ -90,7 +91,7 @@ interface RenderDotsProps {

type RenderDotsFunction = (props: RenderDotsProps) => void

interface DotGroupProps {
interface DotGroupProps extends React.HTMLAttributes<HTMLDivElement> {
readonly children?: React.ReactNode
readonly className?: string
readonly dotNumbers?: boolean
Expand All @@ -109,7 +110,7 @@ declare const DotGroup: DotGroupInterface



interface DotProps {
interface DotProps extends React.HTMLAttributes<HTMLDivElement> {
readonly children?: React.ReactChild
readonly className?: string
readonly disabled?: boolean
Expand All @@ -124,7 +125,7 @@ declare const Dot: DotInterface



interface ButtonNextProps {
interface ButtonNextProps extends React.HTMLAttributes<HTMLButtonElement> {
readonly children: React.ReactChild
readonly className?: string
readonly disabled?: boolean
Expand All @@ -138,7 +139,7 @@ declare const ButtonNext: ButtonNextInterface



interface ButtonBackProps {
interface ButtonBackProps extends React.HTMLAttributes<HTMLButtonElement> {
readonly children: React.ReactChild
readonly className?: string
readonly disabled?: boolean
Expand All @@ -152,7 +153,7 @@ declare const ButtonBack: ButtonBackInterface



interface ButtonLastProps {
interface ButtonLastProps extends React.HTMLAttributes<HTMLButtonElement> {
readonly children: React.ReactChild
readonly className?: string
readonly disabled?: boolean
Expand All @@ -166,7 +167,7 @@ declare const ButtonLast: ButtonLastInterface



interface ButtonFirstProps {
interface ButtonFirstProps extends React.HTMLAttributes<HTMLButtonElement> {
readonly children: React.ReactChild
readonly className?: string
readonly disabled?: boolean
Expand All @@ -180,7 +181,7 @@ declare const ButtonFirst: ButtonLastInterface



interface ButtonPlayProps {
interface ButtonPlayProps extends React.HTMLAttributes<HTMLButtonElement> {
readonly childrenPaused?: React.ReactNode
readonly childrenPlaying?: React.ReactNode
readonly className?: string
Expand Down

0 comments on commit 658d369

Please sign in to comment.