diff --git a/src/components/Alert/Alert.tsx b/src/components/Alert/Alert.tsx index 65557c3..ae35c21 100644 --- a/src/components/Alert/Alert.tsx +++ b/src/components/Alert/Alert.tsx @@ -11,7 +11,6 @@ import Icon from '../Icon/Icon'; import { IconNameType } from '../Icon/types'; import theme, { Theme } from '../../theme'; import { AlertIcon } from './AlertIcon'; -import { deviceWidth } from '../../utils/dimentions'; type AlertProps = React.ComponentProps & { variant?: VariantProps['variant']; @@ -51,7 +50,7 @@ const Alert = ({ return ( - + diff --git a/src/components/Alert/__snapshots__/Alert.test.tsx.snap b/src/components/Alert/__snapshots__/Alert.test.tsx.snap index 3df5a12..2de0b60 100644 --- a/src/components/Alert/__snapshots__/Alert.test.tsx.snap +++ b/src/components/Alert/__snapshots__/Alert.test.tsx.snap @@ -24,7 +24,6 @@ exports[`Alert should render alert correctly 1`] = ` { "flexDirection": "row", "padding": 16, - "width": 718, }, ] } diff --git a/src/components/DatePicker/__snapshots__/DatePicker.test.tsx.snap b/src/components/DatePicker/__snapshots__/DatePicker.test.tsx.snap index 30acca7..a1ac956 100644 --- a/src/components/DatePicker/__snapshots__/DatePicker.test.tsx.snap +++ b/src/components/DatePicker/__snapshots__/DatePicker.test.tsx.snap @@ -514,6 +514,16 @@ exports[`DatePicker Calendar navigation should handle month navigation with year "backgroundColor": "transparent", "borderWidth": 0, }, + [ + { + "transform": [ + { + "scaleX": 1, + }, + ], + }, + undefined, + ], { "flex": 0, "height": 20, @@ -523,6 +533,13 @@ exports[`DatePicker Calendar navigation should handle month navigation with year } testID="icon" title="arrow-left" + transform={ + [ + { + "scaleX": 1, + }, + ] + } vbHeight={24} vbWidth={24} width={20} @@ -776,6 +793,16 @@ exports[`DatePicker Calendar navigation should handle month navigation with year "backgroundColor": "transparent", "borderWidth": 0, }, + [ + { + "transform": [ + { + "scaleX": 1, + }, + ], + }, + undefined, + ], { "flex": 0, "height": 20, @@ -785,6 +812,13 @@ exports[`DatePicker Calendar navigation should handle month navigation with year } testID="icon" title="arrow-right" + transform={ + [ + { + "scaleX": 1, + }, + ] + } vbHeight={24} vbWidth={24} width={20} @@ -5154,6 +5188,16 @@ exports[`DatePicker Calendar navigation should handle month navigation with year "backgroundColor": "transparent", "borderWidth": 0, }, + [ + { + "transform": [ + { + "scaleX": 1, + }, + ], + }, + undefined, + ], { "flex": 0, "height": 20, @@ -5163,6 +5207,13 @@ exports[`DatePicker Calendar navigation should handle month navigation with year } testID="icon" title="arrow-left" + transform={ + [ + { + "scaleX": 1, + }, + ] + } vbHeight={24} vbWidth={24} width={20} @@ -5416,6 +5467,16 @@ exports[`DatePicker Calendar navigation should handle month navigation with year "backgroundColor": "transparent", "borderWidth": 0, }, + [ + { + "transform": [ + { + "scaleX": 1, + }, + ], + }, + undefined, + ], { "flex": 0, "height": 20, @@ -5425,6 +5486,13 @@ exports[`DatePicker Calendar navigation should handle month navigation with year } testID="icon" title="arrow-right" + transform={ + [ + { + "scaleX": 1, + }, + ] + } vbHeight={24} vbWidth={24} width={20} @@ -9794,6 +9862,16 @@ exports[`DatePicker Calendar navigation should open month picker when month butt "backgroundColor": "transparent", "borderWidth": 0, }, + [ + { + "transform": [ + { + "scaleX": 1, + }, + ], + }, + undefined, + ], { "flex": 0, "height": 20, @@ -9803,6 +9881,13 @@ exports[`DatePicker Calendar navigation should open month picker when month butt } testID="icon" title="arrow-left" + transform={ + [ + { + "scaleX": 1, + }, + ] + } vbHeight={24} vbWidth={24} width={20} @@ -10057,6 +10142,16 @@ exports[`DatePicker Calendar navigation should open month picker when month butt "backgroundColor": "transparent", "borderWidth": 0, }, + [ + { + "transform": [ + { + "scaleX": 1, + }, + ], + }, + undefined, + ], { "flex": 0, "height": 20, @@ -10066,6 +10161,13 @@ exports[`DatePicker Calendar navigation should open month picker when month butt } testID="icon" title="arrow-right" + transform={ + [ + { + "scaleX": 1, + }, + ] + } vbHeight={24} vbWidth={24} width={20} @@ -11501,6 +11603,16 @@ exports[`DatePicker Calendar navigation should open year picker when year button "backgroundColor": "transparent", "borderWidth": 0, }, + [ + { + "transform": [ + { + "scaleX": 1, + }, + ], + }, + undefined, + ], { "flex": 0, "height": 20, @@ -11510,6 +11622,13 @@ exports[`DatePicker Calendar navigation should open year picker when year button } testID="icon" title="arrow-left" + transform={ + [ + { + "scaleX": 1, + }, + ] + } vbHeight={24} vbWidth={24} width={20} @@ -11764,6 +11883,16 @@ exports[`DatePicker Calendar navigation should open year picker when year button "backgroundColor": "transparent", "borderWidth": 0, }, + [ + { + "transform": [ + { + "scaleX": 1, + }, + ], + }, + undefined, + ], { "flex": 0, "height": 20, @@ -11773,6 +11902,13 @@ exports[`DatePicker Calendar navigation should open year picker when year button } testID="icon" title="arrow-right" + transform={ + [ + { + "scaleX": 1, + }, + ] + } vbHeight={24} vbWidth={24} width={20} @@ -13743,6 +13879,16 @@ exports[`DatePicker Context edge cases should handle month selection with year c "backgroundColor": "transparent", "borderWidth": 0, }, + [ + { + "transform": [ + { + "scaleX": 1, + }, + ], + }, + undefined, + ], { "flex": 0, "height": 20, @@ -13752,6 +13898,13 @@ exports[`DatePicker Context edge cases should handle month selection with year c } testID="icon" title="arrow-left" + transform={ + [ + { + "scaleX": 1, + }, + ] + } vbHeight={24} vbWidth={24} width={20} @@ -14006,6 +14159,16 @@ exports[`DatePicker Context edge cases should handle month selection with year c "backgroundColor": "transparent", "borderWidth": 0, }, + [ + { + "transform": [ + { + "scaleX": 1, + }, + ], + }, + undefined, + ], { "flex": 0, "height": 20, @@ -14015,6 +14178,13 @@ exports[`DatePicker Context edge cases should handle month selection with year c } testID="icon" title="arrow-right" + transform={ + [ + { + "scaleX": 1, + }, + ] + } vbHeight={24} vbWidth={24} width={20} @@ -15450,6 +15620,16 @@ exports[`DatePicker Context edge cases should handle month selection with year c "backgroundColor": "transparent", "borderWidth": 0, }, + [ + { + "transform": [ + { + "scaleX": 1, + }, + ], + }, + undefined, + ], { "flex": 0, "height": 20, @@ -15459,6 +15639,13 @@ exports[`DatePicker Context edge cases should handle month selection with year c } testID="icon" title="arrow-left" + transform={ + [ + { + "scaleX": 1, + }, + ] + } vbHeight={24} vbWidth={24} width={20} @@ -15712,6 +15899,16 @@ exports[`DatePicker Context edge cases should handle month selection with year c "backgroundColor": "transparent", "borderWidth": 0, }, + [ + { + "transform": [ + { + "scaleX": 1, + }, + ], + }, + undefined, + ], { "flex": 0, "height": 20, @@ -15721,6 +15918,13 @@ exports[`DatePicker Context edge cases should handle month selection with year c } testID="icon" title="arrow-right" + transform={ + [ + { + "scaleX": 1, + }, + ] + } vbHeight={24} vbWidth={24} width={20} @@ -20090,6 +20294,16 @@ exports[`DatePicker MonthPicker specific tests should handle month selection wit "backgroundColor": "transparent", "borderWidth": 0, }, + [ + { + "transform": [ + { + "scaleX": 1, + }, + ], + }, + undefined, + ], { "flex": 0, "height": 20, @@ -20099,6 +20313,13 @@ exports[`DatePicker MonthPicker specific tests should handle month selection wit } testID="icon" title="arrow-left" + transform={ + [ + { + "scaleX": 1, + }, + ] + } vbHeight={24} vbWidth={24} width={20} @@ -20353,6 +20574,16 @@ exports[`DatePicker MonthPicker specific tests should handle month selection wit "backgroundColor": "transparent", "borderWidth": 0, }, + [ + { + "transform": [ + { + "scaleX": 1, + }, + ], + }, + undefined, + ], { "flex": 0, "height": 20, @@ -20362,6 +20593,13 @@ exports[`DatePicker MonthPicker specific tests should handle month selection wit } testID="icon" title="arrow-right" + transform={ + [ + { + "scaleX": 1, + }, + ] + } vbHeight={24} vbWidth={24} width={20} @@ -21797,6 +22035,16 @@ exports[`DatePicker MonthPicker specific tests should handle month selection wit "backgroundColor": "transparent", "borderWidth": 0, }, + [ + { + "transform": [ + { + "scaleX": 1, + }, + ], + }, + undefined, + ], { "flex": 0, "height": 20, @@ -21806,6 +22054,13 @@ exports[`DatePicker MonthPicker specific tests should handle month selection wit } testID="icon" title="arrow-left" + transform={ + [ + { + "scaleX": 1, + }, + ] + } vbHeight={24} vbWidth={24} width={20} @@ -22059,6 +22314,16 @@ exports[`DatePicker MonthPicker specific tests should handle month selection wit "backgroundColor": "transparent", "borderWidth": 0, }, + [ + { + "transform": [ + { + "scaleX": 1, + }, + ], + }, + undefined, + ], { "flex": 0, "height": 20, @@ -22068,6 +22333,13 @@ exports[`DatePicker MonthPicker specific tests should handle month selection wit } testID="icon" title="arrow-right" + transform={ + [ + { + "scaleX": 1, + }, + ] + } vbHeight={24} vbWidth={24} width={20} diff --git a/src/icons/ArrowLeft.tsx b/src/icons/ArrowLeft.tsx index 676c710..500766b 100644 --- a/src/icons/ArrowLeft.tsx +++ b/src/icons/ArrowLeft.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; import Svg, { SvgProps, Path } from 'react-native-svg'; +import { I18nManager } from 'react-native'; const SvgArrowLeft = (props: SvgProps) => ( ( viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" + style={[ + { transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }] }, + props.style, + ]} {...props}> ); diff --git a/src/icons/ArrowRight.tsx b/src/icons/ArrowRight.tsx index b3514ca..4f75bd3 100644 --- a/src/icons/ArrowRight.tsx +++ b/src/icons/ArrowRight.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; import Svg, { SvgProps, Path } from 'react-native-svg'; +import { I18nManager } from 'react-native'; const SvgArrowRight = (props: SvgProps) => ( ( viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" + style={[ + { transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }] }, + props.style, + ]} {...props}> );