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