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/tweaks/tweaks.story.tsx | 14 +- app/components/tweaks/tweaks.tsx | 257 ++++++++++++++++++--------------- 2 files changed, 151 insertions(+), 120 deletions(-) (limited to 'app/components/tweaks') diff --git a/app/components/tweaks/tweaks.story.tsx b/app/components/tweaks/tweaks.story.tsx index 7ff70d6..770d50f 100644 --- a/app/components/tweaks/tweaks.story.tsx +++ b/app/components/tweaks/tweaks.story.tsx @@ -1,12 +1,12 @@ -import * as React from "react" -import { storiesOf } from "@storybook/react-native" -import { StoryScreen, Story, UseCase } from "../../../storybook/views" -import { color } from "../../theme" -import { Tweaks } from "./tweaks" +import * as React from 'react' +import { storiesOf } from '@storybook/react-native' +import { StoryScreen, Story, UseCase } from '../../../storybook/views' +import { color } from '../../theme' +import { Tweaks } from './tweaks' -storiesOf("Tweaks", module) +storiesOf('Tweaks', module) .addDecorator((fn) => {fn()}) - .add("Style Presets", () => ( + .add('Style Presets', () => ( diff --git a/app/components/tweaks/tweaks.tsx b/app/components/tweaks/tweaks.tsx index d6f4d8c..1985174 100644 --- a/app/components/tweaks/tweaks.tsx +++ b/app/components/tweaks/tweaks.tsx @@ -1,4 +1,4 @@ -import * as React from "react" +import * as React from 'react' import { ScrollView, StyleProp, @@ -8,20 +8,20 @@ import { ViewStyle, StyleSheet, Button, -} from "react-native" -import { observer } from "mobx-react-lite" -import { color, typography } from "../../theme" -import { Text } from "../" -import { flatten } from "ramda" -import Slider from "@react-native-community/slider" -import { useState } from "react" -import Accordion from "react-native-collapsible/Accordion" -import * as Animatable from "react-native-animatable" -import Icon from "react-native-vector-icons/MaterialCommunityIcons" -import {Switch} from "react-native-elements" +} from 'react-native' +import { observer } from 'mobx-react-lite' +import { color, typography } from '../../theme' +import { Text } from '../' +import { flatten } from 'ramda' +import Slider from '@react-native-community/slider' +import { useState } from 'react' +import Accordion from 'react-native-collapsible/Accordion' +import * as Animatable from 'react-native-animatable' +import Icon from 'react-native-vector-icons/MaterialCommunityIcons' +import { Switch } from 'react-native-elements' const CONTAINER: ViewStyle = { - justifyContent: "center", + justifyContent: 'center', } const TEXT: TextStyle = { @@ -42,21 +42,23 @@ export interface TweaksProps { /** * Describe your component here */ -export const Tweaks = observer(function Tweaks(props: TweaksProps): JSX.Element { +export const Tweaks = observer(function Tweaks( + props: TweaksProps, +): JSX.Element { const { style, physics, setPhysics } = props // const styles = flatten([CONTAINER, style]) const content = [ { - title: "Physics", + title: 'Physics', content: ( - + - + - + - + - - + - + - + - - + - - - + - + - + - + - + - - - ), + title: 'Modes', + content: , }, ] @@ -367,13 +390,15 @@ export const Tweaks = observer(function Tweaks(props: TweaksProps): JSX.Element if (tweaks) { return ( - + { @@ -405,11 +430,11 @@ export const Tweaks = observer(function Tweaks(props: TweaksProps): JSX.Element setTweaks(true) }} style={{ - position: "absolute", + position: 'absolute', top: 50, left: 50, width: 30, - color: "#ffffff", + color: '#ffffff', zIndex: 100, }} > @@ -421,17 +446,17 @@ export const Tweaks = observer(function Tweaks(props: TweaksProps): JSX.Element return ( - + - + - + - { @@ -487,7 +518,7 @@ export const Tweaks = observer(function Tweaks(props: TweaksProps): JSX.Element }} /> - + - { @@ -516,12 +547,12 @@ export const Tweaks = observer(function Tweaks(props: TweaksProps): JSX.Element }} /> - { @@ -535,85 +566,85 @@ export const Tweaks = observer(function Tweaks(props: TweaksProps): JSX.Element const styles = StyleSheet.create({ container: { - display: "flex", - backgroundColor: "#2a2e38", - position: "absolute", + display: 'flex', + backgroundColor: '#2a2e38', + position: 'absolute', zIndex: 5, - marginLeft: "2%", - marginTop: "2%", + marginLeft: '2%', + marginTop: '2%', maxWidth: 275, borderRadius: 10, - borderStyle: "solid", + borderStyle: 'solid', borderWidth: 10, - borderColor: "#2a2e38", - maxHeight: "80%", + borderColor: '#2a2e38', + maxHeight: '80%', paddingBottom: 20, }, title: { - textAlign: "left", + textAlign: 'left', fontSize: 22, - fontWeight: "300", + fontWeight: '300', marginBottom: 20, paddingLeft: 10, }, header: { - backgroundColor: "#2a2e38", + backgroundColor: '#2a2e38', padding: 10, paddingBottom: 20, - textAlign: "left", + textAlign: 'left', }, headerText: { - textAlign: "left", + textAlign: 'left', paddingLeft: 30, fontSize: 16, - fontWeight: "500", + fontWeight: '500', }, content: { padding: 20, paddingLeft: 60, - backgroundColor: "#000000", + backgroundColor: '#000000', }, active: { - backgroundColor: "#2a2e38", + backgroundColor: '#2a2e38', }, inactive: { - backgroundColor: "#2a2e38", + backgroundColor: '#2a2e38', }, selectors: { marginBottom: 10, - flexDirection: "row", - justifyContent: "center", + flexDirection: 'row', + justifyContent: 'center', }, selector: { - backgroundColor: "#2a2e38", + backgroundColor: '#2a2e38', padding: 10, }, activeSelector: { - fontWeight: "bold", + fontWeight: 'bold', }, selectTitle: { fontSize: 14, - fontWeight: "500", + fontWeight: '500', padding: 10, }, multipleToggle: { - flexDirection: "row", - justifyContent: "center", + flexDirection: 'row', + justifyContent: 'center', marginVertical: 30, - alignItems: "center", + alignItems: 'center', }, multipleToggle__title: { fontSize: 16, marginRight: 8, }, slider: { - minimumTrackTintColor: "#a991f1", - thumbTintColor: "#a991f1", + minimumTrackTintColor: '#a991f1', + thumbTintColor: '#a991f1', height: 40, - width: "90%", + width: '90%', }, switch: { - width: "5", + width: '5', height: 20, marginVertical: 10, }, -- cgit v1.2.3