Skip to content

Commit

Permalink
fix: Removed defaultProps from component, resolves #54
Browse files Browse the repository at this point in the history
  • Loading branch information
Lavve authored and oflisback committed May 18, 2024
1 parent 8aea905 commit 5684f53
Showing 1 changed file with 9 additions and 21 deletions.
30 changes: 9 additions & 21 deletions src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,15 @@ const updateHtmlIconLink = (keepIconLink) => {
}

const Favicon = ({
iconSize,
alertCount,
alertFillColor,
alertTextColor,
animated,
animationDelay,
keepIconLink,
renderOverlay,
url,
iconSize = DefaultCanvasSize,
alertCount = null,
alertFillColor = 'red',
alertTextColor = 'white',
animated = true,
animationDelay = 500,
keepIconLink = () => false,
renderOverlay = null,
url = null,
}) => {
const animationIndex = useRef(0)
const animationTickIntervalId = useRef(null)
Expand Down Expand Up @@ -183,18 +183,6 @@ const Favicon = ({
return null
}

Favicon.defaultProps = {
iconSize: DefaultCanvasSize,
alertCount: null,
alertFillColor: 'red',
alertTextColor: 'white',
animated: true,
animationDelay: 500,
keepIconLink: () => false,
renderOverlay: null,
url: null,
}

Favicon.propTypes = {
iconSize: PropTypes.number,
alertCount: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
Expand Down

0 comments on commit 5684f53

Please sign in to comment.