Skip to content

Commit

Permalink
Merge pull request #494 from jpudysz/fix/withUnistyles-style-types
Browse files Browse the repository at this point in the history
fix: withUnistyles style types
  • Loading branch information
jpudysz authored Jan 17, 2025
2 parents b843d6e + 1b0c2f3 commit 0f3060a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/withUnistyles/withUnistyles.tsx
Original file line number Diff line number Diff line change
@@ -16,12 +16,14 @@ export const withUnistyles = <TComponent, TMappings extends GenericComponentProp
type TProps = GenericComponentProps<TComponent>
type PropsWithUnistyles = PartialBy<TProps, keyof TMappings | SupportedStyleProps> & {
uniProps?: Mappings<TProps>
}
type UnistyleStyles = {
style?: UnistylesValues,
contentContainerStyle?: UnistylesValues
}

return forwardRef<GenericComponentRef<TComponent>, PropsWithUnistyles>((props, ref) => {
const narrowedProps = props as PropsWithUnistyles
const narrowedProps = props as PropsWithUnistyles & UnistyleStyles
const styleClassNames = getClassName(narrowedProps.style)
const contentContainerStyleClassNames = getClassName(narrowedProps.contentContainerStyle)
const { proxifiedRuntime, proxifiedTheme } = useProxifiedUnistyles()

0 comments on commit 0f3060a

Please sign in to comment.