Skip to content

Commit

Permalink
removed relative paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ammichael committed Mar 2, 2020
1 parent 70e333d commit acfba8e
Show file tree
Hide file tree
Showing 31 changed files with 53 additions and 64 deletions.
2 changes: 1 addition & 1 deletion src/components/Avatar/styles.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from 'styled-components/native';
import { Touchable } from '~/components';
import { Touchable } from '..';

interface WrapperProps {
size: number;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Button/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { FC } from 'react';
import { LoadingIndicator } from '~/components';
import { isIOS } from '~/helpers';
import { LoadingIndicator } from '..';
import { isIOS } from '../../utils/helpers';
import { Icon, Touchable, ButtonWrapper, ButtonText } from './styles';

const shadowStyle = {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Button/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {
Typography,
Touchable as TouchableComponent,
Icon as DefaultIcon,
} from '~/components';
import { getTheme } from '~/helpers';
} from '..';
import { getTheme } from '../../utils/helpers';

const smallSpacing = getTheme('smallSpacing');
const mediumSpacing = getTheme('mediumSpacing');
Expand Down
4 changes: 2 additions & 2 deletions src/components/CircleButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from 'react';
import { Spring, config as springConfig } from 'react-spring/renderprops';
import { LoadingIndicator } from '~/components';
import { IconSets } from '~/types';
import { LoadingIndicator } from '..';
import { IconSets } from '../../utils/types';
import { Wrapper, Touch, Icon } from './styles';

const bigSize = 70;
Expand Down
4 changes: 2 additions & 2 deletions src/components/CircleButton/styles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from 'styled-components/native';
import { Touchable, Icon as IconComponent } from '~/components';
import { getTheme, ifStyle } from '~/helpers';
import { Touchable, Icon as IconComponent } from '..';
import { getTheme, ifStyle } from '../../utils/helpers';

const isSelected = ifStyle('isSelected');

Expand Down
2 changes: 1 addition & 1 deletion src/components/FormContainer/styles.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import styled from 'styled-components/native';
import { KeyboardAvoidingView } from '~/components';
import { KeyboardAvoidingView } from '..';

export const Wrapper = styled(KeyboardAvoidingView)``;
2 changes: 1 addition & 1 deletion src/components/FormError/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FC, ReactNode } from 'react';
import { FormError as FormErrorType } from '~/types';
import { FormError as FormErrorType } from '../../utils/types';
import { ErrorText } from './styles';

interface Props {
Expand Down
4 changes: 2 additions & 2 deletions src/components/FormError/styles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from 'styled-components/native';
import { Typography } from '~/components';
import { getTheme } from '~/helpers';
import { Typography } from '..';
import { getTheme } from '../../utils/helpers';

export const ErrorText = styled(Typography)`
min-height: 17px;
Expand Down
6 changes: 3 additions & 3 deletions src/components/Icon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import React, { PureComponent } from 'react';
import { Animated, View } from 'react-native';
import MaterialIcons from 'react-native-vector-icons/MaterialCommunityIcons';
import FontAwesomeIcons from 'react-native-vector-icons/FontAwesome';
import { IconSets } from '~/types';
import { Touchable } from '~/components';
import * as Icons from '~/svg';
import { IconSets } from '../../utils/types';
import { Touchable } from '..';
import * as Icons from '../../assets/svg';

interface Props {
name: string;
Expand Down
4 changes: 2 additions & 2 deletions src/components/KeyboardAvoidingView/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { FC } from 'react';
import { KeyboardAvoidingView as Wrapper } from 'react-native';
import { KeyboardAvoiding as KeyboardAvoidingTypes } from '~/types';
import { isIOS } from '~/helpers';
import { KeyboardAvoiding as KeyboardAvoidingTypes } from '../../utils/types';
import { isIOS } from '../../utils/helpers';

const defaultBehavior = isIOS() ? 'padding' : undefined;

Expand Down
4 changes: 2 additions & 2 deletions src/components/Link/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { FC } from 'react';
import { Touchable } from '~/components';
import { Variants } from '~/types';
import { Touchable } from '..';
import { Variants } from '../../utils/types';
import { Text } from './styles';

interface Props {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Link/styles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from 'styled-components/native';
import { Typography } from '~/components';
import { getTheme } from '~/helpers';
import { Typography } from '..';
import { getTheme } from '../../utils/helpers';

const primaryMain = getTheme('primary.main');

Expand Down
4 changes: 2 additions & 2 deletions src/components/MenuRow/styles.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from 'styled-components/native';
import { getTheme } from '~/helpers';
import { Touchable, Typography, Icon } from '~/components';
import { getTheme } from '../../utils/helpers';
import { Touchable, Typography, Icon } from '..';

const smallSpacing = getTheme('smallSpacing');

Expand Down
2 changes: 1 addition & 1 deletion src/components/SceneWrapper/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FC } from 'react';
import { DismissKeyboardView } from '~/components';
import { DismissKeyboardView } from '..';
import { ChildrenWrapper } from './styles';

interface Props {
Expand Down
2 changes: 1 addition & 1 deletion src/components/SceneWrapper/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
getBottomSpace,
isIphoneX,
} from 'react-native-iphone-x-helper';
import { getTheme, ifStyle } from '~/helpers';
import { getTheme, ifStyle } from '../../utils/helpers';

const extraPadding = isIphoneX() ? 10 : 0;
const statusBarHeight = getStatusBarHeight();
Expand Down
4 changes: 2 additions & 2 deletions src/components/SelectableButton/styles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from 'styled-components/native';
import { Touchable, Typography } from '~/components';
import { getTheme, ifStyle } from '~/helpers';
import { Touchable, Typography } from '..';
import { getTheme, ifStyle } from '../../utils/helpers';

const isSelected = ifStyle('isSelected');
const isDisabled = ifStyle('isDisabled');
Expand Down
4 changes: 2 additions & 2 deletions src/components/SelectableFlatButton/styles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from 'styled-components/native';
import { Touchable, Typography } from '~/components';
import { getTheme, ifStyle } from '~/helpers';
import { Touchable, Typography } from '..';
import { getTheme, ifStyle } from '../../utils/helpers';

const isSelected = ifStyle('isSelected');
const primaryContrast = getTheme('primary.contrast');
Expand Down
4 changes: 2 additions & 2 deletions src/components/SelectableRow/styles.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import styled from 'styled-components/native';
import { getTheme, ifStyle } from '~/helpers';
import { Touchable, Typography, Icon } from '~/components';
import { getTheme, ifStyle } from '../../utils/helpers';
import { Touchable, Typography, Icon } from '..';

const smallIconSize = 24;
const bigIconSize = 30;
Expand Down
4 changes: 2 additions & 2 deletions src/components/SettingsSection/styles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from 'styled-components/native';
import { Typography } from '~/components';
import { getTheme } from '~/helpers';
import { Typography } from '..';
import { getTheme } from '../../utils/helpers';

const smallSpacing = getTheme('smallSpacing');
const mediumSpacing = getTheme('mediumSpacing');
Expand Down
4 changes: 2 additions & 2 deletions src/components/SettingsToggle/styles.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled from 'styled-components/native';
import { Switch } from 'react-native';
import { Typography } from '~/components';
import { getTheme } from '~/helpers';
import { Typography } from '..';
import { getTheme } from '../../utils/helpers';

const labelColor = getTheme('primary.contrast');
const toggleColors = getTheme('outcome.light');
Expand Down
2 changes: 1 addition & 1 deletion src/components/SocialButtons/FacebookButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { FC } from 'react';
import styled from 'styled-components/native';
import { Button } from '~/components';
import { Button } from '../..';

const Wrapper = styled(Button).attrs({ sound: true })`
background-color: #2d4688;
Expand Down
2 changes: 1 addition & 1 deletion src/components/SocialButtons/GoogleButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { FC } from 'react';
import styled from 'styled-components/native';
import { Button } from '~/components';
import { Button } from '../..';

const Wrapper = styled(Button).attrs({ sound: true })`
background-color: #dd2a27;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Stepper/styles.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import styled from 'styled-components/native';
import { Touchable, Typography, Icon as DefaultIcon } from '~/components';
import { getTheme, ifStyle } from '~/helpers';
import { Touchable, Typography, Icon as DefaultIcon } from '..';
import { getTheme, ifStyle } from '../../utils/helpers';

const primaryContrast = getTheme('primary.contrast');
const isDisabled = ifStyle('isDisabled');
Expand Down
4 changes: 2 additions & 2 deletions src/components/SummaryCard/styles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from 'styled-components/native';
import { Typography, Icon as DefaultIcon } from '~/components';
import { getTheme } from '~/helpers';
import { Typography, Icon as DefaultIcon } from '..';
import { getTheme } from '../../utils/helpers';

const mediumSpacing = getTheme('mediumSpacing');
const baseRadius = getTheme('baseRadius');
Expand Down
2 changes: 1 addition & 1 deletion src/components/TextInput/MaskedTextInput/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { FC } from 'react';
import { MaskedInput as MaskedTextInputType } from '~/types';
import { MaskedInput as MaskedTextInputType } from '../../../utils/types';
import { TextInput } from './styles';

const MaskedTextInput: FC<MaskedTextInputType> = ({
Expand Down
2 changes: 1 addition & 1 deletion src/components/TextInput/PasswordInput/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, FC, useCallback } from 'react';
import { Input as TextInputType } from '~/types';
import { Input as TextInputType } from '../../../utils/types';
import TextInput from '../index';

const PasswordInput: FC<TextInputType> = (props) => {
Expand Down
6 changes: 3 additions & 3 deletions src/components/TextInput/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { FC, useState, useEffect, useCallback } from 'react';
import { Animated, TextInputProps as RNTextInputProps } from 'react-native';
import { isEmpty } from 'lodash';
import { colors } from '~/theme';
import { usePrevious } from '~/hooks';
import { Input as TextInputType, InputStatus } from '~/types';
import { colors } from '../../theme';
import { usePrevious } from '../../utils/hooks';
import { Input as TextInputType, InputStatus } from '../../utils/types';
import MaskedTextInput from './MaskedTextInput';
import {
Label,
Expand Down
4 changes: 2 additions & 2 deletions src/components/TextInput/styles.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled from 'styled-components/native';
import { Animated } from 'react-native';
import { ifStyle, switchStyle, getTheme } from '~/helpers';
import { Input as TextInputType, InputStatus } from '~/types';
import { ifStyle, switchStyle, getTheme } from '../../utils/helpers';
import { Input as TextInputType, InputStatus } from '../../utils/types';

interface InputAreaWrapperProps {
multiline: boolean;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Touchable/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { FC } from 'react';
import { Touchable as TouchableType } from '~/types';
import { generateHaptic } from '~/helpers';
import { Touchable as TouchableType } from '../../utils/types';
import { generateHaptic } from '../../utils/helpers';
import { Wrapper, TouchAnimation } from './styles';

const resetTouchableStyle = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Typography/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { FC } from 'react';
import { human } from 'react-native-typography';
import { withTheme } from 'styled-components';
import { Typography as TypographyType } from '~/types';
import { Typography as TypographyType } from '../../utils/types';
import { Text } from './styles';

const Typography: FC<TypographyType> = ({
Expand Down
13 changes: 1 addition & 12 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,11 @@
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"experimentalDecorators": true,
/* Module Resolution Options */
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"baseUrl": ".",
"paths": {
"~/svg": ["src/assets/svg"],
"~/images": ["src/assets/images"],
"~/components": ["src/components"],
"~/theme": ["src/theme"],
"~/types": ["src/utils/types"],
"~/hooks": ["src/utils/hooks"],
"~/modules": ["src/utils/modules"],
"~/helpers": ["src/utils/helpers"]
}
"baseUrl": "."
},
"include": ["src"],
"exclude": [
Expand Down

0 comments on commit acfba8e

Please sign in to comment.