Skip to content

Commit

Permalink
Merge pull request raxjs#325 from raxjs/feat/text-support-wechat
Browse files Browse the repository at this point in the history
feat(rax-text): support using text in wechat
  • Loading branch information
ChrisCindy authored Jan 28, 2021
2 parents 9bd4224 + 3bc9837 commit ebe433f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## 2020-01-13

### rax-text [2.0.5]

#### Changed

- Use text component in WeChat MiniProgram

### rax-countdown [1.1.5]

#### Fixed
Expand Down
4 changes: 2 additions & 2 deletions packages/rax-text/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createElement, forwardRef, ForwardRefExoticComponent } from 'rax';
import { isWeex, isMiniApp } from 'universal-env';
import { isWeex, isMiniApp, isWeChatMiniProgram } from 'universal-env';
import { TextProps } from './types';
import './index.css';

Expand Down Expand Up @@ -36,7 +36,7 @@ const Text: ForwardRefExoticComponent<TextProps> = forwardRef((props, ref) => {
{textString}
</text>
);
} else if (isMiniApp) {
} else if (isMiniApp || isWeChatMiniProgram) {
return (
<text
{...rest}
Expand Down

0 comments on commit ebe433f

Please sign in to comment.