Skip to content

Commit

Permalink
fix: border validation
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieljablonski committed Jul 2, 2023
1 parent 7e2d8b3 commit d414ea1
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/components/TooltipController/TooltipController.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,11 @@ const TooltipController = ({
// eslint-disable-next-line no-console
console.warn('[react-tooltip] Do not set `style.border`. Use `border` prop instead.')
}
if (border) {
if (!cssAttrIsValid('border', border)) {
// eslint-disable-next-line no-console
console.warn(
`[react-tooltip] "${border}" is not a valid \`border\`. See https://developer.mozilla.org/en-US/docs/Web/CSS/border`,
)
}
if (border && !cssAttrIsValid('border', border)) {
// eslint-disable-next-line no-console
console.warn(
`[react-tooltip] "${border}" is not a valid \`border\`. See https://developer.mozilla.org/en-US/docs/Web/CSS/border`,
)
}
}, [])

Expand Down

0 comments on commit d414ea1

Please sign in to comment.