Skip to content

Commit

Permalink
fix(types): fix role prop (#5851)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyletsang authored Jun 3, 2021
1 parent 71857c7 commit 28769b4
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"@restart/hooks": "^0.3.26",
"@types/invariant": "^2.2.33",
"@types/prop-types": "^15.7.3",
"@types/react": ">=16.14.4",
"@types/react": ">=16.14.8",
"@types/react-transition-group": "^4.4.1",
"@types/warning": "^3.0.0",
"classnames": "^2.3.1",
Expand Down
5 changes: 3 additions & 2 deletions src/Collapse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ import TransitionWrapper from './TransitionWrapper';

type Dimension = 'height' | 'width';

export interface CollapseProps extends TransitionCallbacks {
export interface CollapseProps
extends TransitionCallbacks,
Pick<React.HTMLAttributes<HTMLElement>, 'role'> {
className?: string;
in?: boolean;
mountOnEnter?: boolean;
Expand All @@ -27,7 +29,6 @@ export interface CollapseProps extends TransitionCallbacks {
dimension?: Dimension | (() => Dimension);
getDimensionValue?: (dimension: Dimension, element: HTMLElement) => number;
children: React.ReactElement;
role?: string;
}

const MARGINS: { [d in Dimension]: string[] } = {
Expand Down
1 change: 0 additions & 1 deletion src/SafeAnchor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export interface SafeAnchorProps
BsPrefixProps {
href?: string;
disabled?: boolean;
role?: string;
tabIndex?: number;
}

Expand Down
1 change: 0 additions & 1 deletion src/Spinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export interface SpinnerProps
extends React.HTMLAttributes<HTMLElement>,
BsPrefixProps {
animation: 'border' | 'grow';
role?: string;
size?: 'sm';
variant?: Variant;
}
Expand Down
16 changes: 15 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1386,14 +1386,28 @@
dependencies:
"@types/react" "*"

"@types/react@*", "@types/react@>=16.14.4", "@types/react@>=16.9.11":
"@types/react@*", "@types/react@>=16.9.11":
version "17.0.2"
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.2.tgz#3de24c4efef902dd9795a49c75f760cbe4f7a5a8"
integrity sha512-Xt40xQsrkdvjn1EyWe1Bc0dJLcil/9x2vAuW7ya+PuQip4UYUaXyhzWmAbwRsdMgwOFHpfp7/FFZebDU6Y8VHA==
dependencies:
"@types/prop-types" "*"
csstype "^3.0.2"

"@types/react@>=16.14.8":
version "17.0.8"
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.8.tgz#fe76e3ba0fbb5602704110fd1e3035cf394778e3"
integrity sha512-3sx4c0PbXujrYAKwXxNONXUtRp9C+hE2di0IuxFyf5BELD+B+AXL8G7QrmSKhVwKZDbv0igiAjQAMhXj8Yg3aw==
dependencies:
"@types/prop-types" "*"
"@types/scheduler" "*"
csstype "^3.0.2"

"@types/scheduler@*":
version "0.16.1"
resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.1.tgz#18845205e86ff0038517aab7a18a62a6b9f71275"
integrity sha512-EaCxbanVeyxDRTQBkdLb3Bvl/HK7PBK6UJjsSixB0iHKoWxE5uu2Q/DgtpOhPIojN0Zl1whvOd7PoHs2P0s5eA==

"@types/warning@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/warning/-/warning-3.0.0.tgz#0d2501268ad8f9962b740d387c4654f5f8e23e52"
Expand Down

0 comments on commit 28769b4

Please # to comment.