Skip to content

Commit

Permalink
refactor: remove prop-types from root workspace.
Browse files Browse the repository at this point in the history
  • Loading branch information
morganney committed Nov 5, 2023
1 parent 72ef50c commit dccd409
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
"/lib"
],
"dependencies": {
"colord": "^2.9.3",
"prop-types": "^15.8.1"
"colord": "^2.9.3"
},
"peerDependencies": {
"react": ">=17.0.0",
Expand Down
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions src/ReactColorA11y.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useEffect, useRef, cloneElement, isValidElement, ReactNode } from 'react'
import PropTypes from 'prop-types'
import { colord, extend as extendColord, type Colord } from 'colord'
import colordNamesPlugin from 'colord/plugins/names'
import colordA11yPlugin from 'colord/plugins/a11y'
Expand Down Expand Up @@ -208,15 +207,4 @@ const ReactColorA11y: React.FunctionComponent<ReactColorA11yProps> = ({
)
}

ReactColorA11y.propTypes = {
children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node),
PropTypes.node
]).isRequired,
colorPaletteKey: PropTypes.string,
requiredContrastRatio: PropTypes.number,
flipBlackAndWhite: PropTypes.bool,
preserveContrastDirectionIfPossible: PropTypes.bool
}

export default ReactColorA11y

0 comments on commit dccd409

Please sign in to comment.