Skip to content

Commit

Permalink
fix(CamelIcon): remove defaultProps
Browse files Browse the repository at this point in the history
  • Loading branch information
mmelko authored and tadayosi committed Jun 12, 2024
1 parent a2722f4 commit d28acf4
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/hawtio/src/plugins/camel/icons/CamelImageIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@ type CamelImageIconProps = {
name: string
svg: string
size: number
} & typeof defaultImageIconProps

const defaultImageIconProps = {
size: 16,
}

const CamelImageIcon = (props: CamelImageIconProps) => {
return <img src={props.svg} width={props.size + 'px'} height={props.size + 'px'} alt={props.name} />
const { name, svg, size = 16 } = props
return <img src={svg} width={size + 'px'} height={size + 'px'} alt={name} />
}

CamelImageIcon.defaultProps = defaultImageIconProps

export { CamelImageIcon }

0 comments on commit d28acf4

Please sign in to comment.