From c535187e1de55facf84512d97f88eaf2de198818 Mon Sep 17 00:00:00 2001 From: ankit-tailor Date: Mon, 7 Nov 2022 14:27:24 +0530 Subject: [PATCH] fix: remove cyclic dependency --- src/index.tsx | 2 ++ src/theme/styled-system.ts | 3 ++- src/utils/getStyledFromProps.ts | 4 ++-- src/utils/index.ts | 1 - 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 8b93b2df7..9bd642d05 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -123,6 +123,7 @@ import { ICheckboxProps, ICheckboxGroupProps, Radio, + RadioContext, IRadioProps, IRadioValue, IRadioGroupProps, @@ -202,6 +203,7 @@ export { Code, Checkbox, Radio, + RadioContext, Column, Row, Center, diff --git a/src/theme/styled-system.ts b/src/theme/styled-system.ts index 200db4c2b..575d972d4 100644 --- a/src/theme/styled-system.ts +++ b/src/theme/styled-system.ts @@ -610,7 +610,8 @@ export const getStyleAndFilteredProps = ({ let { styleFromProps, responsiveStyles }: any = getStyledFromProps( styledSystemProps, theme, - currentBreakpoint + currentBreakpoint, + propConfig ); if (responsiveStyles) { diff --git a/src/utils/getStyledFromProps.ts b/src/utils/getStyledFromProps.ts index e792165db..faf75ab24 100644 --- a/src/utils/getStyledFromProps.ts +++ b/src/utils/getStyledFromProps.ts @@ -1,4 +1,3 @@ -import { propConfig } from '../theme/styled-system'; import { hasValidBreakpointFormat } from '../theme/tools'; import { getRNKeyAndStyleValue } from './getRNKeyAndStyleValue'; import type { ITheme } from '../theme'; @@ -13,7 +12,8 @@ import type { ITheme } from '../theme'; export const getStyledFromProps = ( styledSystemProps: any, theme: any, - currentBreakpoint: any + currentBreakpoint: any, + propConfig: any ) => { let styleFromProps: any = {}; let responsiveStyles: null | Record< diff --git a/src/utils/index.ts b/src/utils/index.ts index d708fd2f7..cc367192a 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -14,7 +14,6 @@ export { composeEventHandlers, }; export { wrapStringChild } from './wrapStringChild'; -export { RadioContext } from '../components/primitives/Radio/RadioGroup'; export { combineContextAndProps } from './combineContextAndProps'; export type { IAccessibilityProps } from './accessibilityTypes'; export { ariaAttr } from './accessibilityUtils';