Skip to content

Commit

Permalink
fix(core): allow for actual motionConfig proptypes on <Container /> (#…
Browse files Browse the repository at this point in the history
…2653)

Co-authored-by: Joshua <[email protected]>
  • Loading branch information
Josh-a-e and Joshua authored Nov 7, 2024
1 parent 7ed3ae0 commit 1a4b871
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/components/Container.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useRef } from 'react'
import PropTypes from 'prop-types'
import { TooltipProvider, Tooltip } from '@nivo/tooltip'
import { ThemeProvider } from '../theming'
import { MotionConfigProvider } from '../motion'
import { MotionConfigProvider, motionPropTypes } from '../motion'
import { ConditionalWrapper } from './ConditionalWrapper'

const containerStyle = {
Expand Down Expand Up @@ -43,7 +43,7 @@ Container.propTypes = {
renderWrapper: PropTypes.bool,
theme: PropTypes.object,
animate: PropTypes.bool,
motionConfig: PropTypes.string,
motionConfig: PropTypes.oneOfType([PropTypes.string, motionPropTypes.motionConfig]),
}

export default Container
4 changes: 2 additions & 2 deletions packages/core/src/components/LegacyContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from '@nivo/tooltip'
import noop from '../lib/noop'
import { ThemeProvider } from '../theming'
import { MotionConfigProvider } from '../motion'
import { MotionConfigProvider, motionPropTypes } from '../motion'
import { ConditionalWrapper } from './ConditionalWrapper'

const containerStyle = {
Expand Down Expand Up @@ -72,5 +72,5 @@ LegacyContainer.propTypes = {
renderWrapper: PropTypes.bool,
theme: PropTypes.object.isRequired,
animate: PropTypes.bool.isRequired,
motionConfig: PropTypes.string,
motionConfig: PropTypes.oneOfType([PropTypes.string, motionPropTypes.motionConfig]),
}

0 comments on commit 1a4b871

Please sign in to comment.