From f0bf4e7afdcd8b02a62be45ab3e7d047ed865a79 Mon Sep 17 00:00:00 2001 From: Kirill Rogovoy Date: Mon, 19 Jul 2021 20:06:08 +0300 Subject: Apply Prettier --- app/components/auto-image/auto-image.story.tsx | 26 +- app/components/auto-image/auto-image.tsx | 6 +- app/components/bullet-item/bullet-item.tsx | 16 +- app/components/button/button.presets.ts | 16 +- app/components/button/button.props.ts | 11 +- app/components/button/button.story.tsx | 44 ++- app/components/button/button.tsx | 12 +- app/components/checkbox/checkbox.props.ts | 4 +- app/components/checkbox/checkbox.story.tsx | 45 +-- app/components/checkbox/checkbox.tsx | 33 ++- app/components/form-row/form-row.presets.ts | 4 +- app/components/form-row/form-row.props.tsx | 6 +- app/components/form-row/form-row.story.tsx | 46 +-- app/components/form-row/form-row.tsx | 8 +- app/components/graph-ui/graph-ui.story.tsx | 14 +- app/components/graph-ui/graph-ui.tsx | 32 ++- app/components/graph/graph.story.tsx | 14 +- app/components/graph/graph.tsx | 318 ++++++++++++--------- app/components/graph/graphgood.tsx | 155 ++++++---- app/components/header/header.props.ts | 6 +- app/components/header/header.story.tsx | 20 +- app/components/header/header.tsx | 28 +- app/components/icon/icon.props.ts | 4 +- app/components/icon/icon.story.tsx | 12 +- app/components/icon/icon.tsx | 12 +- app/components/icon/icons/index.ts | 4 +- app/components/index.ts | 32 +-- app/components/local-button/local-button.story.tsx | 14 +- app/components/local-button/local-button.tsx | 43 +-- app/components/local/local.story.tsx | 14 +- app/components/local/local.tsx | 34 ++- app/components/screen/screen.presets.ts | 20 +- app/components/screen/screen.props.ts | 10 +- app/components/screen/screen.tsx | 42 ++- app/components/switch/switch.props.ts | 2 +- app/components/switch/switch.story.tsx | 53 ++-- app/components/switch/switch.tsx | 25 +- app/components/text-field/text-field.story.tsx | 69 +++-- app/components/text-field/text-field.tsx | 23 +- app/components/text/text.presets.ts | 8 +- app/components/text/text.props.ts | 8 +- app/components/text/text.story.tsx | 39 +-- app/components/text/text.tsx | 20 +- app/components/tweaks/tweaks.story.tsx | 14 +- app/components/tweaks/tweaks.tsx | 257 +++++++++-------- app/components/wallpaper/wallpaper.presets.ts | 6 +- app/components/wallpaper/wallpaper.props.ts | 4 +- app/components/wallpaper/wallpaper.story.tsx | 12 +- app/components/wallpaper/wallpaper.tsx | 12 +- 49 files changed, 955 insertions(+), 702 deletions(-) (limited to 'app/components') diff --git a/app/components/auto-image/auto-image.story.tsx b/app/components/auto-image/auto-image.story.tsx index f7ecc86..76e9dab 100644 --- a/app/components/auto-image/auto-image.story.tsx +++ b/app/components/auto-image/auto-image.story.tsx @@ -1,31 +1,37 @@ /* eslint-disable */ -import * as React from "react" -import { storiesOf } from "@storybook/react-native" -import { StoryScreen, Story, UseCase } from "../../../storybook/views" -import { AutoImage } from "./auto-image" +import * as React from 'react' +import { storiesOf } from '@storybook/react-native' +import { StoryScreen, Story, UseCase } from '../../../storybook/views' +import { AutoImage } from './auto-image' declare let module -const bowser = require("../../screens/welcome/bowser.png") -const morty = { uri: "https://rickandmortyapi.com/api/character/avatar/2.jpeg" } +const bowser = require('../../screens/welcome/bowser.png') +const morty = { uri: 'https://rickandmortyapi.com/api/character/avatar/2.jpeg' } -storiesOf("AutoImage", module) +storiesOf('AutoImage', module) .addDecorator((fn) => {fn()}) - .add("Style Presets", () => ( + .add('Style Presets', () => ( - + - + )) diff --git a/app/components/auto-image/auto-image.tsx b/app/components/auto-image/auto-image.tsx index 39d71ca..a8bfe37 100644 --- a/app/components/auto-image/auto-image.tsx +++ b/app/components/auto-image/auto-image.tsx @@ -1,10 +1,10 @@ -import React, { useLayoutEffect, useState } from "react" +import React, { useLayoutEffect, useState } from 'react' import { Image as RNImage, ImageProps as DefaultImageProps, ImageURISource, Platform, -} from "react-native" +} from 'react-native' type ImageProps = DefaultImageProps & { source: ImageURISource @@ -31,7 +31,7 @@ export function AutoImage(props: ImageProps) { RNImage.getSize(props.source.uri as any, (width, height) => { setImageSize({ width, height }) }) - } else if (Platform.OS === "web") { + } else if (Platform.OS === 'web') { // web requires a different method to get it's size RNImage.getSize(props.source as any, (width, height) => { setImageSize({ width, height }) diff --git a/app/components/bullet-item/bullet-item.tsx b/app/components/bullet-item/bullet-item.tsx index d999e10..f6b2f17 100644 --- a/app/components/bullet-item/bullet-item.tsx +++ b/app/components/bullet-item/bullet-item.tsx @@ -1,15 +1,15 @@ -import * as React from "react" -import { View, ViewStyle, ImageStyle, TextStyle } from "react-native" -import { Text } from "../text/text" -import { Icon } from "../icon/icon" -import { spacing, typography } from "../../theme" +import * as React from 'react' +import { View, ViewStyle, ImageStyle, TextStyle } from 'react-native' +import { Text } from '../text/text' +import { Icon } from '../icon/icon' +import { spacing, typography } from '../../theme' const BULLET_ITEM: ViewStyle = { - flexDirection: "row", + flexDirection: 'row', marginTop: spacing[4], paddingBottom: spacing[4], borderBottomWidth: 1, - borderBottomColor: "#3A3048", + borderBottomColor: '#3A3048', } const BULLET_CONTAINER: ViewStyle = { marginRight: spacing[4] - 1, @@ -22,7 +22,7 @@ const BULLET: ImageStyle = { const BULLET_TEXT: TextStyle = { flex: 1, fontFamily: typography.primary, - color: "#BAB6C8", + color: '#BAB6C8', fontSize: 15, lineHeight: 22, } diff --git a/app/components/button/button.presets.ts b/app/components/button/button.presets.ts index b140fd2..bc0ad3f 100644 --- a/app/components/button/button.presets.ts +++ b/app/components/button/button.presets.ts @@ -1,5 +1,5 @@ -import { ViewStyle, TextStyle } from "react-native" -import { color, spacing } from "../../theme" +import { ViewStyle, TextStyle } from 'react-native' +import { color, spacing } from '../../theme' /** * All text will start off looking like this. @@ -8,8 +8,8 @@ const BASE_VIEW: ViewStyle = { paddingVertical: spacing[2], paddingHorizontal: spacing[2], borderRadius: 4, - justifyContent: "center", - alignItems: "center", + justifyContent: 'center', + alignItems: 'center', } const BASE_TEXT: TextStyle = { @@ -34,12 +34,16 @@ export const viewPresets: Record = { ...BASE_VIEW, paddingHorizontal: 0, paddingVertical: 0, - alignItems: "flex-start", + alignItems: 'flex-start', } as ViewStyle, } export const textPresets: Record = { - primary: { ...BASE_TEXT, fontSize: 9, color: color.palette.white } as TextStyle, + primary: { + ...BASE_TEXT, + fontSize: 9, + color: color.palette.white, + } as TextStyle, link: { ...BASE_TEXT, color: color.text, diff --git a/app/components/button/button.props.ts b/app/components/button/button.props.ts index 1377a7e..5f26136 100644 --- a/app/components/button/button.props.ts +++ b/app/components/button/button.props.ts @@ -1,6 +1,11 @@ -import { StyleProp, TextStyle, TouchableOpacityProps, ViewStyle } from "react-native" -import { ButtonPresetNames } from "./button.presets" -import { TxKeyPath } from "../../i18n" +import { + StyleProp, + TextStyle, + TouchableOpacityProps, + ViewStyle, +} from 'react-native' +import { ButtonPresetNames } from './button.presets' +import { TxKeyPath } from '../../i18n' export interface ButtonProps extends TouchableOpacityProps { /** diff --git a/app/components/button/button.story.tsx b/app/components/button/button.story.tsx index 4861772..5dc21c1 100644 --- a/app/components/button/button.story.tsx +++ b/app/components/button/button.story.tsx @@ -1,30 +1,48 @@ -import * as React from "react" -import { ViewStyle, TextStyle, Alert } from "react-native" -import { storiesOf } from "@storybook/react-native" -import { StoryScreen, Story, UseCase } from "../../../storybook/views" -import { Button } from "./button" +import * as React from 'react' +import { ViewStyle, TextStyle, Alert } from 'react-native' +import { storiesOf } from '@storybook/react-native' +import { StoryScreen, Story, UseCase } from '../../../storybook/views' +import { Button } from './button' declare let module -const buttonStyleArray: ViewStyle[] = [{ paddingVertical: 100 }, { borderRadius: 0 }] +const buttonStyleArray: ViewStyle[] = [ + { paddingVertical: 100 }, + { borderRadius: 0 }, +] -const buttonTextStyleArray: TextStyle[] = [{ fontSize: 20 }, { color: "#a511dc" }] +const buttonTextStyleArray: TextStyle[] = [ + { fontSize: 20 }, + { color: '#a511dc' }, +] -storiesOf("Button", module) +storiesOf('Button', module) .addDecorator((fn) => {fn()}) - .add("Style Presets", () => ( + .add('Style Presets', () => ( -