Skip to content

Commit 1eb5c0f

Browse files
authored
Merge pull request #19 from fram-x/release/0.3.0
Release/0.3.0
2 parents ec507bf + a74739b commit 1eb5c0f

File tree

7 files changed

+32
-7
lines changed

7 files changed

+32
-7
lines changed

App.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import React, {Component} from 'react';
1010
import {Platform, StyleSheet, Text, View} from 'react-native';
1111

12-
import { StyledText } from './lib';
12+
import StyledText from './lib';
1313

1414
const instructions = Platform.select({
1515
ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Example:
3535

3636
```javascript
3737
import { StyleSheet } from 'react-native';
38-
import { StyledText } from 'react-native-styled-text';
38+
import StyledText from 'react-native-styled-text';
3939

4040
...
4141
<StyledText
@@ -66,7 +66,7 @@ Example:
6666

6767
```javascript
6868
import { StyleSheet } from 'react-native';
69-
import { StyledText } from 'react-native-styled-text';
69+
import StyledText from 'react-native-styled-text';
7070

7171
...
7272
<StyledText

lib/StyledText/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ class StyledText extends React.PureComponent<Props> {
1515
}
1616
}
1717

18-
export { StyledText };
18+
export default StyledText;

lib/index.d.ts

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import * as React from 'react';
2+
import { StyleSheet, TextProps } from 'react-native';
3+
4+
export interface Props extends TextProps {
5+
/**
6+
* HTML-like text containing style tags
7+
* e.g., `Welcome to <b><u>React Native</u> <demo><i>Styled</i> Text</demo></b> demo!`
8+
* where the style tags must be either one of the predefined tags: `<b>`, `<i>` or `<u>`
9+
* or refer to custom styles defined in the textStyles property, e.g. `<demo>`
10+
*/
11+
text?: string;
12+
/**
13+
* Custom styles which may be used as style tags in the text property
14+
*/
15+
textStyles?: object;
16+
}
17+
18+
/**
19+
* Use StyledText for shorthand mixing of text styles in a text element with an HTML-like notation.
20+
*/
21+
declare class StyledText extends React.PureComponent<Props> {}
22+
23+
export default StyledText;

lib/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
export * from './StyledText';
1+
import StyledText from './StyledText';
2+
3+
export default StyledText;

lib/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-styled-text",
3-
"version": "0.2.0",
3+
"version": "0.3.0",
44
"description": "A React Native component for easy rendering of styled text.",
55
"main": "./index.js",
66
"scripts": {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-styled-text-ex",
3-
"version": "0.2.0",
3+
"version": "0.3.0",
44
"private": true,
55
"scripts": {
66
"start": "node node_modules/react-native/local-cli/cli.js start",

0 commit comments

Comments
 (0)