Skip to content

Commit

Permalink
Add a native example and demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Basquerotto committed Dec 23, 2023
1 parent 1a21ecd commit 3cd9e5b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<a href="#quickstart">Quickstart</a> |
<a href="https://github.com/lucasbasquerotto/react-read-more/tree/master/examples/src/app.tsx">Examples</a> |
<a href="https://lucasbasquerotto.github.io/react-read-more">Demo</a> |
<a href="https://snack.expo.dev/@lucas99freelas/react-shorten">Native Demo</a>
<a href="https://snack.expo.dev/@lucasbasquerotto/react-shorten">Native Demo</a>
</p>

### Features
Expand Down Expand Up @@ -233,7 +233,7 @@ export default ReadMoreWeb;

This library does not provides a native component (so as to not have react-native as a dependency), but it can be easily created just like the web/html example above, just changing the buttons to native components like `Pressable` (or even `Text`) with `onPress` or another press/tap event handler of your preference.

The following code is the implementation of the `ReadMoreNative` component in the [react-native demo](https://snack.expo.dev/@lucas99freelas/react-shorten). It can be used as a reference when implementing a native component:
The following code is the implementation of the `ReadMoreNative` component in the [react-native demo](https://snack.expo.dev/@lucasbasquerotto/react-shorten). It can be used as a reference when implementing a native component:

```tsx
import React from 'react';
Expand Down Expand Up @@ -295,4 +295,4 @@ export default ReadMoreNative;

### Demos

You can see a live web (react-dom) demo [here](https://lucasbasquerotto.github.io/react-read-more) and a react-native demo [here](https://snack.expo.dev/@lucas99freelas/react-shorten).
You can see a live web (react-dom) demo [here](https://lucasbasquerotto.github.io/react-read-more) and a react-native demo [here](https://snack.expo.dev/@lucasbasquerotto/react-shorten).
2 changes: 1 addition & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-shorten-examples",
"version": "1.1.3",
"version": "1.1.4",
"homepage": ".",
"description": "React and TypeScript example starter project",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-shorten",
"version": "1.1.3",
"version": "1.1.4",
"description": "React Read More base and web (HTML) component",
"repository": {
"type": "git",
Expand Down

0 comments on commit 3cd9e5b

Please sign in to comment.