Skip to content

Commit

Permalink
fix(types): Alert and Badge ref typing
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense committed Jul 9, 2019
1 parent 0edced5 commit d11cfed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions types/components/Alert.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ declare class AlertHeading<
As extends React.ReactType = 'div'
> extends BsPrefixComponent<As> {}

export interface AlertProps extends React.HTMLProps<Alert> {
export interface AlertProps extends React.HTMLProps<HTMLDivElement> {
bsPrefix?: string;
variant?:
| 'primary'
Expand All @@ -30,9 +30,9 @@ export interface AlertProps extends React.HTMLProps<Alert> {
transition?: React.ReactType;
}

declare class Alert extends React.Component<AlertProps> {
static Link: typeof AlertLink;
static Heading: typeof AlertHeading;
}
declare const Alert: React.ForwardRefExoticComponent<AlertProps> & {
Link: typeof AlertLink;
Heading: typeof AlertHeading;
};

export default Alert;
4 changes: 2 additions & 2 deletions types/components/Badge.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';

export interface BadgeProps extends React.HTMLProps<Badge> {
export interface BadgeProps extends React.HTMLProps<HTMLSpanElement> {
bsPrefix?: string;
variant?:
| 'primary'
Expand All @@ -14,6 +14,6 @@ export interface BadgeProps extends React.HTMLProps<Badge> {
pill?: boolean;
}

declare class Badge extends React.Component<BadgeProps> {}
declare const Badge: React.ForwardRefExoticComponent<BadgeProps>;

export default Badge;

0 comments on commit d11cfed

Please sign in to comment.