Skip to content

Commit

Permalink
run lint across all dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
robertKozik committed Jan 17, 2024
1 parent d80746b commit 7ee8adf
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
4 changes: 2 additions & 2 deletions example/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AppRegistry } from 'react-native';
import {AppRegistry} from 'react-native';
import App from './src/App';
import { name as appName } from './app.json';
import {name as appName} from './app.json';

AppRegistry.registerComponent(appName, () => App);
37 changes: 19 additions & 18 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
import * as React from 'react';

import { Button, Platform, StyleSheet, Text, View } from 'react-native';
import {Button, Platform, StyleSheet, Text, View} from 'react-native';

import { MarkdownTextInput } from '@expensify/react-native-live-markdown';
import type { TextInput } from 'react-native';
import {MarkdownTextInput} from '@expensify/react-native-live-markdown';
import type {TextInput} from 'react-native';

const DEFAULT_TEXT = [
'Hello, *world*!',
'https://expensify.com',
'# Lorem ipsum',
'> Hello world',
'`foo`',
'```\nbar\n```',
'@here',
'@[email protected]',
].join('\n');
const DEFAULT_TEXT = ['Hello, *world*!', 'https://expensify.com', '# Lorem ipsum', '> Hello world', '`foo`', '```\nbar\n```', '@here', '@[email protected]'].join('\n');

function isWeb() {
return Platform.OS === 'web';
Expand Down Expand Up @@ -58,7 +49,7 @@ function getArchitecture() {
}

function getReactNativeVersion() {
const { major, minor, patch } = Platform.constants.reactNativeVersion;
const {major, minor, patch} = Platform.constants.reactNativeVersion;
return `${major}.${minor}.${patch}`;
}

Expand Down Expand Up @@ -115,22 +106,32 @@ export default function App() {
style={styles.input}
/> */}
<Text style={styles.text}>{JSON.stringify(value)}</Text>
<Button title="Focus" onPress={() => {
<Button
title="Focus"
onPress={() => {
if (!ref.current) {
return;
}
ref.current.focus();
}}
/>
<Button title="Blur" onPress={() => {
<Button
title="Blur"
onPress={() => {
if (!ref.current) {
return;
}
ref.current.blur();
}}
/>
<Button title="Reset" onPress={() => setValue(DEFAULT_TEXT)} />
<Button title="Clear" onPress={() => setValue('')} />
<Button
title="Reset"
onPress={() => setValue(DEFAULT_TEXT)}
/>
<Button
title="Clear"
onPress={() => setValue('')}
/>
</View>
);
}
Expand Down

0 comments on commit 7ee8adf

Please sign in to comment.