Skip to content

Commit

Permalink
Fix on textShadowOffset prop
Browse files Browse the repository at this point in the history
  • Loading branch information
ntorionbearstudio committed Nov 8, 2024
1 parent 68774ef commit f320d62
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-ficus-ui",
"version": "1.3.1",
"version": "1.3.2",
"description": "React Native UI library forked from Magnus UI and inspired by Chakra UI",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down
12 changes: 8 additions & 4 deletions src/components/avatar/avatar.style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,14 @@ export const getStyle = (theme: ThemeType, props: AvatarProps) => {
theme.colors,
props.textShadowColor as string
),
textShadowOffset: {
width: getThemeProperty(theme.shadow, props.textShadowOffset),
height: getThemeProperty(theme.shadow, props.textShadowOffset),
},
...(props.textShadowOffset?.width || props.textShadowOffset?.height
? {
textShadowOffset: {
width: props.textShadowOffset?.width,
height: props.textShadowOffset?.height,
},
}
: {}),
textShadowRadius: getThemeProperty(
theme.borderRadius,
props.textShadowRadius
Expand Down
12 changes: 8 additions & 4 deletions src/components/badge/badge.style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,14 @@ export const getStyle = (theme: ThemeType, props: BadgeProps) => {
theme.colors,
props.textShadowColor as string
),
textShadowOffset: {
width: getThemeProperty(theme.shadow, props.textShadowOffset),
height: getThemeProperty(theme.shadow, props.textShadowOffset),
},
...(props.textShadowOffset?.width || props.textShadowOffset?.height
? {
textShadowOffset: {
width: props.textShadowOffset?.width,
height: props.textShadowOffset?.height,
},
}
: {}),
textShadowRadius: getThemeProperty(
theme.borderRadius,
props.textShadowRadius
Expand Down
12 changes: 8 additions & 4 deletions src/components/input/input.style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,14 @@ export const getStyle = (theme: ThemeType, props: InputProps, state: any) => {
theme.colors,
props.textShadowColor as string
),
textShadowOffset: {
width: getThemeProperty(theme.shadow, props.textShadowOffset),
height: getThemeProperty(theme.shadow, props.textShadowOffset),
},
...(props.textShadowOffset?.width || props.textShadowOffset?.height
? {
textShadowOffset: {
width: props.textShadowOffset?.width,
height: props.textShadowOffset?.height,
},
}
: {}),
textShadowRadius: getThemeProperty(
theme.borderRadius,
props.textShadowRadius
Expand Down
12 changes: 8 additions & 4 deletions src/components/text/text.style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,14 @@ export const getStyle = (theme: ThemeType, props: TextProps) => {
theme.colors,
props.textShadowColor as string
),
textShadowOffset: {
width: getThemeProperty(theme.shadow, props.textShadowOffset),
height: getThemeProperty(theme.shadow, props.textShadowOffset),
},
...(props.textShadowOffset?.width || props.textShadowOffset?.height
? {
textShadowOffset: {
width: props.textShadowOffset?.width,
height: props.textShadowOffset?.height,
},
}
: {}),
textShadowRadius: getThemeProperty(
theme.borderRadius,
props.textShadowRadius
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ export interface TextPropsType {
textDecorationColor?: ResponsiveValue<string>;
textShadowColor?: ResponsiveValue<string>;
textShadowOffset?: ResponsiveValue<{ width: number; height: number }>;
textShadowRadius?: ResponsiveValue<number>;
textShadowRadius?: ResponsiveValue<string | number>;
}

export const opacityProps = ['opacity'] as const;
Expand Down

0 comments on commit f320d62

Please sign in to comment.