Skip to content

Commit

Permalink
Fix primefaces#2974: Badge/Avatar typescript inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Jun 8, 2022
1 parent 5eddf9a commit fa3bae7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions components/lib/avatar/Avatar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ type AvatarShapeType = 'square' | 'circle';

type AvatarTemplateType = React.ReactNode | ((props: AvatarProps) => React.ReactNode);

export interface AvatarProps {
export interface AvatarProps extends Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'ref'> {
label?: string;
icon?: IconType<AvatarProps>;
image?: string;
size?: AvatarSizeType;
shape?: AvatarShapeType;
style?: object;
className?: string;
template?: AvatarTemplateType;
imageAlt?: string;
onImageError?(event: React.SyntheticEvent): void;
Expand Down
4 changes: 1 addition & 3 deletions components/lib/badge/Badge.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ type BadgeSeverityType = 'success' | 'info' | 'warn' | 'error' | (string & {});

type BadgeSizeType = 'normal' | 'large' | 'xlarge';

export interface BadgeProps {
export interface BadgeProps extends Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, 'ref'> {
value?: any;
severity?: BadgeSeverityType;
size?: BadgeSizeType;
style?: object;
className?: string;
children?: React.ReactNode;
}

Expand Down

0 comments on commit fa3bae7

Please sign in to comment.