From ce8b9ed62bcf484ad498b0de05998d8986b132ac Mon Sep 17 00:00:00 2001 From: Hailey Date: Thu, 11 Jan 2024 22:15:50 -0800 Subject: [PATCH] add readme, update info --- modules/expo-selectable-text/README.md | 33 +++++++++++++++++++ .../expo-module.config.json | 5 +-- .../ios/ExpoSelectableText.podspec | 6 ++-- 3 files changed, 37 insertions(+), 7 deletions(-) create mode 100644 modules/expo-selectable-text/README.md diff --git a/modules/expo-selectable-text/README.md b/modules/expo-selectable-text/README.md new file mode 100644 index 0000000000..a60e192dc7 --- /dev/null +++ b/modules/expo-selectable-text/README.md @@ -0,0 +1,33 @@ +# Expo Selectable Text + +This module creates a wrapper `` for React Native's `` component. Text components are +parsed and rendered using UITextView instead of UILabel, allowing for text selection. + +## Usage + +In most cases, you can simply use like so: + +```tsx + + Here is some text. + +``` + +You may also have nested `` components inside the `` block. For example: +```tsx + + Here is some text. {Alert.alert('Press!')}}>And this is a link. + +``` + +Note that nested components should always use `` and not ``. Only the outermost `` should +be replaced with ``. + +Like `` styles given to `` will be passed to each child `` component unless specified in the +child's style. All the base [React Native Text styles](https://reactnative.dev/docs/text-style-props) are supported +(with the same iOS limitations, of course). + +## Installation + +Using inside of this project should not require any installation. The podfile should automatically find and locate the +podspec inside of this directory. diff --git a/modules/expo-selectable-text/expo-module.config.json b/modules/expo-selectable-text/expo-module.config.json index f2ceb5a7a0..343fbb79cb 100644 --- a/modules/expo-selectable-text/expo-module.config.json +++ b/modules/expo-selectable-text/expo-module.config.json @@ -1,9 +1,6 @@ { - "platforms": ["ios", "android", "web"], + "platforms": ["ios"], "ios": { "modules": ["ExpoSelectableTextModule"] - }, - "android": { - "modules": ["expo.modules.selectabletext.ExpoSelectableTextModule"] } } diff --git a/modules/expo-selectable-text/ios/ExpoSelectableText.podspec b/modules/expo-selectable-text/ios/ExpoSelectableText.podspec index 7590adda60..dd25f6c62f 100644 --- a/modules/expo-selectable-text/ios/ExpoSelectableText.podspec +++ b/modules/expo-selectable-text/ios/ExpoSelectableText.podspec @@ -1,10 +1,10 @@ Pod::Spec.new do |s| s.name = 'ExpoSelectableText' s.version = '1.0.0' - s.summary = 'A sample project summary' - s.description = 'A sample project description' + s.summary = 'Simple wrapper for RN Text to use UITextView instead of UILabel' + s.description = 'Simple wrapper for RN Text to use UITextView instead of UILabel' s.author = '' - s.homepage = 'https://docs.expo.dev/modules/' + s.homepage = 'https://github.com/bluesky-social/social-app/modules/expo-selectable-text' s.platform = :ios, '13.0' s.source = { git: '' } s.static_framework = true