cleanup imports
This commit is contained in:
@@ -10,8 +10,8 @@ public class ExpoSelectableTextModule: Module {
|
||||
Prop("segments") { (view: ExpoSelectableTextView, prop: String) in
|
||||
// Convert the JSON to segments
|
||||
if let data = prop.data(using: .utf8) {
|
||||
if let segments = try? JSONDecoder().decode([TextSegment].self, from: data) {
|
||||
view.segments = segments
|
||||
if let segments = try? JSONDecoder().decode(TextSegments.self, from: data) {
|
||||
view.segments = segments.segments
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import ExpoModulesCore
|
||||
|
||||
struct TextSegments: Decodable {
|
||||
let segments: Array<TextSegment>
|
||||
}
|
||||
|
||||
struct TextSegment: Decodable {
|
||||
let index: Int
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import {ColorValue, TextStyle, ViewStyle} from 'react-native'
|
||||
import {TextStyle, ViewStyle} from 'react-native'
|
||||
|
||||
interface ExpoProTextViewCommonProps {
|
||||
selectable?: boolean
|
||||
|
||||
@@ -4,7 +4,6 @@ import {s, lh} from 'lib/styles'
|
||||
import {useTheme, TypographyVariant} from 'lib/ThemeContext'
|
||||
import {SelectableText} from '../../../../../modules/expo-selectable-text'
|
||||
import {isIOS} from 'platform/detection'
|
||||
import {fontSize} from '#/alf/tokens'
|
||||
|
||||
export type CustomTextProps = TextProps & {
|
||||
type?: TypographyVariant
|
||||
|
||||
Reference in New Issue
Block a user