Skip to content

Commit 871ed96

Browse files
committed
extract SelectableCell into its own file
1 parent 6547e9a commit 871ed96

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed

source/views/sis/student-work/detail.ios.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@ import openUrl from '../../components/open-url'
88
import * as c from '../../components/colors'
99
import type {JobType} from './types'
1010
import {cleanJob, getContactName, getLinksFromJob} from './clean-job'
11+
import {SelectableCell} from './selectable'
1112

1213
const styles = StyleSheet.create({
13-
selectable: {
14-
paddingVertical: 10,
15-
},
1614
lastUpdated: {
1715
paddingBottom: 20,
1816
},
@@ -23,16 +21,6 @@ const styles = StyleSheet.create({
2321
},
2422
})
2523

26-
const SelectableCell = ({text}: {text: string}) => (
27-
<Cell
28-
cellContentView={
29-
<Text selectable={true} style={styles.selectable}>
30-
{text}
31-
</Text>
32-
}
33-
/>
34-
)
35-
3624
function Title({job}: {job: JobType}) {
3725
return job.title || job.type
3826
? <Section header="JOB">
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// @flow
2+
import React from 'react'
3+
import {Text, StyleSheet} from 'react-native'
4+
import {Cell} from 'react-native-tableview-simple'
5+
6+
const styles = StyleSheet.create({
7+
cell: {
8+
paddingVertical: 10,
9+
},
10+
})
11+
12+
export const SelectableCell = ({text}: {text: string}) => (
13+
<Cell
14+
cellContentView={
15+
<Text selectable={true} style={styles.cell}>
16+
{text}
17+
</Text>
18+
}
19+
/>
20+
)

0 commit comments

Comments
 (0)