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/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 ++++----- 4 files changed, 55 insertions(+), 28 deletions(-) (limited to 'app/components/button') 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', () => ( -