Skip to content

Commit

Permalink
Merge pull request #17 from juniorklawa/fix/versions-and-readme
Browse files Browse the repository at this point in the history
Fix/versions and readme
  • Loading branch information
juniorklawa authored May 26, 2021
2 parents ebc452a + 4579f86 commit 27225b3
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 16 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ Required props: `fontSize`, `numberOfLines`, `overFlowReplacement` and `mode`.
| `minFontSize` | Minimum font size | number | none |
| `granularity` | Text resize granularity | number | none |
| `fontSizePresets` | Font size presets | number[] | none |
| `Overflowreplacement` | Replacement if the text overflows parent | string | '' |
| `Overflowreplacement` | Replacement if the text overflows parent | string | `''` |
| `style` | Text style | | function: () => {} |
| `TextProps` | All other <Text/> props | | function: () => {} |
| `TextProps` | All other `<Text/>` props | | function: () => {} |
<br />
Expand Down
11 changes: 4 additions & 7 deletions example/App.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import React, {useEffect, useState} from 'react';
import {
SafeAreaView,
ScrollView,
StyleSheet,
Text,
View,
} from 'react-native';
import {SafeAreaView, ScrollView, StyleSheet, Text, View} from 'react-native';
import {AutoSizeText, ResizeTextMode} from 'react-native-auto-size-text';

const App = () => {
Expand Down Expand Up @@ -53,6 +47,7 @@ const App = () => {
numberOfLines={2}
minFontSize={24}
fontSize={40}
ellipsizeMode="clip"
mode={ResizeTextMode.min_font_size}>
{text}
</AutoSizeText>
Expand All @@ -63,6 +58,7 @@ const App = () => {
<AutoSizeText
fontSizePresets={[50, 42, 14]}
numberOfLines={3}
ellipsizeMode="clip"
mode={ResizeTextMode.preset_font_sizes}>
{text}
</AutoSizeText>
Expand All @@ -88,6 +84,7 @@ const App = () => {
<Text style={styles.title}>StepGranularity</Text>
<View style={styles.textWrapper}>
<AutoSizeText
ellipsizeMode="clip"
mode={ResizeTextMode.step_granularity}
fontSize={64}
numberOfLines={2}
Expand Down
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"react": "17.0.1",
"react-native": "0.64.1",
"react-native-auto-size-text": "^1.0.14"
"react-native-auto-size-text": "^1.1.0"
},
"devDependencies": {
"@babel/core": "^7.12.9",
Expand Down
19 changes: 14 additions & 5 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1132,6 +1132,13 @@
dependencies:
"@sinonjs/commons" "^1.7.0"

"@testing-library/react-native@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@testing-library/react-native/-/react-native-7.2.0.tgz#e5ec5b0974e4e5f525f8057563417d1e9f820d96"
integrity sha512-rDKzJjAAeGgyoJT0gFQiMsIL09chdWcwZyYx6WZHMgm2c5NDqY52hUuyTkzhqddMYWmSRklFphSg7B2HX+246Q==
dependencies:
pretty-format "^26.0.1"

"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.7":
version "7.1.14"
resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.14.tgz#faaeefc4185ec71c389f4501ee5ec84b170cc402"
Expand Down Expand Up @@ -5183,7 +5190,7 @@ prettier@^2.0.2:
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.0.tgz#b6a5bf1284026ae640f17f7ff5658a7567fc0d18"
integrity sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w==

pretty-format@^26.0.0, pretty-format@^26.5.2, pretty-format@^26.6.2:
pretty-format@^26.0.0, pretty-format@^26.0.1, pretty-format@^26.5.2, pretty-format@^26.6.2:
version "26.6.2"
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93"
integrity sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==
Expand Down Expand Up @@ -5273,10 +5280,12 @@ react-is@^16.8.1:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==

react-native-auto-size-text@^1.0.14:
version "1.0.14"
resolved "https://registry.yarnpkg.com/react-native-auto-size-text/-/react-native-auto-size-text-1.0.14.tgz#35b99e58b137c0960ecd4685272666d1ce867cc6"
integrity sha512-867kUtD209oF8IU0p/4ustVgBF1/ErFFnaTorfh6nVTxuWNzDrMIq4cTcr90mRj6Yf3oFaCK77WXT0vrBmTHuQ==
react-native-auto-size-text@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/react-native-auto-size-text/-/react-native-auto-size-text-1.1.0.tgz#4e5e99ea86ef8b7b59d3d349578e90f7cb269c02"
integrity sha512-yichOVwMHIa1yoCXR15yxi+tnmNwB56WIkDAvVi4jg1+LI8UC5g96YDY9UcJua+NMPIo1cbtHgCYRUvfa5SSVA==
dependencies:
"@testing-library/react-native" "^7.2.0"

react-native-codegen@^0.0.6:
version "0.0.6"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"size",
"responsive"
],
"version": "1.1.0",
"version": "1.1.1",
"description": "React Native component for Android and iOS that provides several ways to resize text within a certain dimension/parent.",
"homepage": "https://github.com/juniorklawa/react-native-auto-size-text",
"main": "lib/index.js",
Expand Down

0 comments on commit 27225b3

Please sign in to comment.