cleanup imports

This commit is contained in:
Hailey
2024-01-12 16:34:28 -08:00
parent c9f0064836
commit 0f0b6aa131
4 changed files with 6 additions and 4 deletions
@@ -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
-1
View File
@@ -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