Skip to content

Commit 7284f96

Browse files
committed
feat: implement import alias for all components and tests
1 parent df829bc commit 7284f96

File tree

129 files changed

+471
-391
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+471
-391
lines changed

src/components/Appbar/AppbarAction.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import type {
88
} from 'react-native';
99

1010
import color from 'color';
11-
import type { ThemeProp } from 'src/types';
1211

13-
import { useInternalTheme } from '../../core/theming';
14-
import { black } from '../../styles/themes/v2/colors';
15-
import { forwardRef } from '../../utils/forwardRef';
16-
import type { IconSource } from '../Icon';
17-
import IconButton from '../IconButton/IconButton';
12+
import type { IconSource } from '@/components/Icon';
13+
import IconButton from '@/components/IconButton/IconButton';
14+
import { useInternalTheme } from '@/core/theming';
15+
import { black } from '@/styles/themes/v2/colors';
16+
import type { ThemeProp } from '@/types';
17+
import { forwardRef } from '@/utils/forwardRef';
1818

1919
export type Props = React.ComponentPropsWithoutRef<typeof IconButton> & {
2020
/**

src/components/Appbar/AppbarBackAction.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ import type {
77
ViewStyle,
88
} from 'react-native';
99

10-
import type { $Omit } from './../../types';
10+
import type { $Omit } from '@/types';
11+
import { forwardRef } from '@/utils/forwardRef';
12+
1113
import AppbarAction from './AppbarAction';
1214
import AppbarBackIcon from './AppbarBackIcon';
13-
import { forwardRef } from '../../utils/forwardRef';
1415

1516
export type Props = $Omit<
1617
React.ComponentPropsWithoutRef<typeof AppbarAction>,

src/components/Appbar/AppbarBackIcon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const AppbarBackIcon = ({ size, color }: { size: number; color: string }) => {
1818
]}
1919
>
2020
<Image
21-
source={require('../../assets/back-chevron.png')}
21+
source={require('@/assets/back-chevron.png')}
2222
style={[
2323
styles.icon,
2424
{ tintColor: color, width: iosIconSize, height: iosIconSize },

src/components/Appbar/AppbarContent.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ import {
1414

1515
import color from 'color';
1616

17+
import Text, { TextRef } from '@/components/Typography/Text';
18+
import { useInternalTheme } from '@/core/theming';
19+
import { white } from '@/styles/themes/v2/colors';
20+
import type { $RemoveChildren, MD3TypescaleKey, ThemeProp } from '@/types';
21+
1722
import { modeTextVariant } from './utils';
18-
import { useInternalTheme } from '../../core/theming';
19-
import { white } from '../../styles/themes/v2/colors';
20-
import type { $RemoveChildren, MD3TypescaleKey, ThemeProp } from '../../types';
21-
import Text, { TextRef } from '../Typography/Text';
2223

2324
type TitleString = {
2425
title: string;

src/components/Appbar/AppbarHeader.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ import {
1111

1212
import { useSafeAreaInsets } from 'react-native-safe-area-context';
1313

14+
import { useInternalTheme } from '@/core/theming';
15+
import shadow from '@/styles/shadow';
16+
import type { ThemeProp } from '@/types';
17+
1418
import { Appbar } from './Appbar';
1519
import {
1620
DEFAULT_APPBAR_HEIGHT,
1721
getAppbarBackgroundColor,
1822
modeAppbarHeight,
1923
getAppbarBorders,
2024
} from './utils';
21-
import { useInternalTheme } from '../../core/theming';
22-
import shadow from '../../styles/shadow';
23-
import type { ThemeProp } from '../../types';
2425

2526
export type Props = Omit<
2627
React.ComponentProps<typeof Appbar>,

src/components/Appbar/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import React from 'react';
22
import type { ColorValue, StyleProp, ViewStyle } from 'react-native';
33
import { StyleSheet, Animated } from 'react-native';
44

5-
import overlay from '../../styles/overlay';
6-
import { black, white } from '../../styles/themes/v2/colors';
7-
import type { InternalTheme, ThemeProp } from '../../types';
5+
import overlay from '@/styles/overlay';
6+
import { black, white } from '@/styles/themes/v2/colors';
7+
import type { InternalTheme, ThemeProp } from '@/types';
88

99
export type AppbarModes = 'small' | 'medium' | 'large' | 'center-aligned';
1010

src/components/Avatar/AvatarIcon.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import * as React from 'react';
22
import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
33

4-
import { useInternalTheme } from '../../core/theming';
5-
import { white } from '../../styles/themes/v2/colors';
6-
import type { ThemeProp } from '../../types';
7-
import getContrastingColor from '../../utils/getContrastingColor';
4+
import { useInternalTheme } from '@/core/theming';
5+
import { white } from '@/styles/themes/v2/colors';
6+
import type { ThemeProp } from '@/types';
7+
import getContrastingColor from '@/utils/getContrastingColor';
8+
89
import Icon, { IconSource } from '../Icon';
910

1011
const defaultSize = 64;

src/components/Avatar/AvatarImage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import {
99
ViewStyle,
1010
} from 'react-native';
1111

12-
import { useInternalTheme } from '../../core/theming';
13-
import type { ThemeProp } from '../../types';
12+
import { useInternalTheme } from '@/core/theming';
13+
import type { ThemeProp } from '@/types';
1414

1515
const defaultSize = 64;
1616

src/components/Avatar/AvatarText.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ import {
88
ViewStyle,
99
} from 'react-native';
1010

11-
import { useInternalTheme } from '../../core/theming';
12-
import { white } from '../../styles/themes/v2/colors';
13-
import type { ThemeProp } from '../../types';
14-
import getContrastingColor from '../../utils/getContrastingColor';
11+
import { useInternalTheme } from '@/core/theming';
12+
import { white } from '@/styles/themes/v2/colors';
13+
import type { ThemeProp } from '@/types';
14+
import getContrastingColor from '@/utils/getContrastingColor';
15+
1516
import Text from '../Typography/Text';
1617

1718
const defaultSize = 64;

src/components/BottomNavigation/BottomNavigation.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ import {
1212

1313
import useLatestCallback from 'use-latest-callback';
1414

15+
import type { IconSource } from '@/components/Icon';
16+
import { Props as TouchableRippleProps } from '@/components/TouchableRipple/TouchableRipple';
17+
import { useInternalTheme } from '@/core/theming';
18+
import type { ThemeProp } from '@/types';
19+
import useAnimatedValueArray from '@/utils/useAnimatedValueArray';
20+
1521
import BottomNavigationBar from './BottomNavigationBar';
1622
import BottomNavigationRouteScreen from './BottomNavigationRouteScreen';
17-
import { useInternalTheme } from '../../core/theming';
18-
import type { ThemeProp } from '../../types';
19-
import useAnimatedValueArray from '../../utils/useAnimatedValueArray';
20-
import type { IconSource } from '../Icon';
21-
import { Props as TouchableRippleProps } from '../TouchableRipple/TouchableRipple';
2223

2324
export type BaseRoute = {
2425
key: string;

0 commit comments

Comments
 (0)