summaryrefslogtreecommitdiff
path: root/app/components/header
diff options
context:
space:
mode:
authorKirill Rogovoy <[email protected]>2021-07-19 20:06:08 +0300
committerKirill Rogovoy <[email protected]>2021-07-19 20:06:08 +0300
commitf0bf4e7afdcd8b02a62be45ab3e7d047ed865a79 (patch)
tree575c0ff2cbb846252bd2e494c81c396846aab2f6 /app/components/header
parent67ad38d0a7cd319623e9f41c0c381ed5c5f6f973 (diff)
Apply Prettier
Diffstat (limited to 'app/components/header')
-rw-r--r--app/components/header/header.props.ts6
-rw-r--r--app/components/header/header.story.tsx20
-rw-r--r--app/components/header/header.tsx28
3 files changed, 27 insertions, 27 deletions
diff --git a/app/components/header/header.props.ts b/app/components/header/header.props.ts
index 07f2c4d..f142656 100644
--- a/app/components/header/header.props.ts
+++ b/app/components/header/header.props.ts
@@ -1,6 +1,6 @@
-import { StyleProp, TextStyle, ViewStyle } from "react-native"
-import { IconTypes } from "../icon/icons"
-import { TxKeyPath } from "../../i18n"
+import { StyleProp, TextStyle, ViewStyle } from 'react-native'
+import { IconTypes } from '../icon/icons'
+import { TxKeyPath } from '../../i18n'
export interface HeaderProps {
/**
diff --git a/app/components/header/header.story.tsx b/app/components/header/header.story.tsx
index 05093b3..db87b89 100644
--- a/app/components/header/header.story.tsx
+++ b/app/components/header/header.story.tsx
@@ -1,9 +1,9 @@
-import * as React from "react"
-import { View, Alert } from "react-native"
-import { storiesOf } from "@storybook/react-native"
-import { StoryScreen, Story, UseCase } from "../../../storybook/views"
-import { Header } from "./header"
-import { color } from "../../theme"
+import * as React from 'react'
+import { View, Alert } from 'react-native'
+import { storiesOf } from '@storybook/react-native'
+import { StoryScreen, Story, UseCase } from '../../../storybook/views'
+import { Header } from './header'
+import { color } from '../../theme'
declare let module
@@ -12,9 +12,9 @@ const VIEWSTYLE = {
backgroundColor: color.storybookDarkBg,
}
-storiesOf("Header", module)
+storiesOf('Header', module)
.addDecorator((fn) => <StoryScreen>{fn()}</StoryScreen>)
- .add("Behavior", () => (
+ .add('Behavior', () => (
<Story>
<UseCase noPad text="default" usage="The default usage">
<View style={VIEWSTYLE}>
@@ -26,7 +26,7 @@ storiesOf("Header", module)
<Header
headerTx="demoScreen.howTo"
leftIcon="back"
- onLeftPress={() => Alert.alert("left nav")}
+ onLeftPress={() => Alert.alert('left nav')}
/>
</View>
</UseCase>
@@ -35,7 +35,7 @@ storiesOf("Header", module)
<Header
headerTx="demoScreen.howTo"
rightIcon="bullet"
- onRightPress={() => Alert.alert("right nav")}
+ onRightPress={() => Alert.alert('right nav')}
/>
</View>
</UseCase>
diff --git a/app/components/header/header.tsx b/app/components/header/header.tsx
index b4a6634..25e0914 100644
--- a/app/components/header/header.tsx
+++ b/app/components/header/header.tsx
@@ -1,23 +1,23 @@
-import React from "react"
-import { View, ViewStyle, TextStyle } from "react-native"
-import { HeaderProps } from "./header.props"
-import { Button } from "../button/button"
-import { Text } from "../text/text"
-import { Icon } from "../icon/icon"
-import { spacing } from "../../theme"
-import { translate } from "../../i18n/"
+import React from 'react'
+import { View, ViewStyle, TextStyle } from 'react-native'
+import { HeaderProps } from './header.props'
+import { Button } from '../button/button'
+import { Text } from '../text/text'
+import { Icon } from '../icon/icon'
+import { spacing } from '../../theme'
+import { translate } from '../../i18n/'
// static styles
const ROOT: ViewStyle = {
- flexDirection: "row",
+ flexDirection: 'row',
paddingHorizontal: spacing[4],
- alignItems: "center",
+ alignItems: 'center',
paddingTop: spacing[5],
paddingBottom: spacing[5],
- justifyContent: "flex-start",
+ justifyContent: 'flex-start',
}
-const TITLE: TextStyle = { textAlign: "center" }
-const TITLE_MIDDLE: ViewStyle = { flex: 1, justifyContent: "center" }
+const TITLE: TextStyle = { textAlign: 'center' }
+const TITLE_MIDDLE: ViewStyle = { flex: 1, justifyContent: 'center' }
const LEFT: ViewStyle = { width: 32 }
const RIGHT: ViewStyle = { width: 32 }
@@ -35,7 +35,7 @@ export function Header(props: HeaderProps) {
style,
titleStyle,
} = props
- const header = headerText || (headerTx && translate(headerTx)) || ""
+ const header = headerText || (headerTx && translate(headerTx)) || ''
return (
<View style={[ROOT, style]}>