Skip to content

Commit

Permalink
example(Button): 增加 button自定义文本实例 (#194)
Browse files Browse the repository at this point in the history
* fix:发布 iOS 应用商店:一. 创建AppID

* fix:发布 iOS 应用商店优化排版

* fix:ios应用商店文档更新及排版优化

* fix:修改环境安装文档语法错误及部分内容优化

* fix:更新ios应用发布流程

* fix:ios应用商店发布更新

* fix:更新ios及安卓应用商店发布

* fix:安卓上架更新

* fix:增加button自定义文本实例

Co-authored-by: 杨楠 <yangnan@nihaosi.com>
  • Loading branch information
Amber-Nan and 杨楠 committed Aug 26, 2021
1 parent ce0c633 commit 95f808f
Showing 1 changed file with 25 additions and 8 deletions.
33 changes: 25 additions & 8 deletions example/examples/src/routes/Button/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React from 'react';
import {View, Text} from 'react-native';
import {Button, Spacing, Icon, Flex} from '@uiw/react-native';
import {ComProps} from '../../routes';
import Layout, {Container} from '../../Layout';
const {Header, Body, Card, Footer} = Layout;
import { View, Text } from 'react-native';
import { Button, Spacing, Icon, Flex } from '@uiw/react-native';
import { ComProps } from '../../routes';
import Layout, { Container } from '../../Layout';
const { Header, Body, Card, Footer } = Layout;

export interface ButtonViewProps extends ComProps {}
export interface ButtonViewProps extends ComProps { }

export default class ButtonView extends React.Component<ButtonViewProps> {
render() {
const {route} = this.props;
const { route } = this.props;
const description = route.params.description;
const title = route.params.title;
return (
Expand Down Expand Up @@ -42,6 +42,10 @@ export default class ButtonView extends React.Component<ButtonViewProps> {
警告禁用按钮 warning
</Button>
<Spacing />
<Button color="#1EABCD" loading>
加载中 loading
</Button>
<Spacing />
<Button type="light" loading>
亮按钮 light
</Button>
Expand Down Expand Up @@ -103,8 +107,21 @@ export default class ButtonView extends React.Component<ButtonViewProps> {
<Spacing />
<Button color="#f6f8fa">自定义颜色{'color="#f6f8fa"'}</Button>
</Card>
<Card title="文本样式">
<Button textStyle={{ fontSize: 20 }} color="yellow">
字号调整{'textStyle = {{fontSize:20}}'}
</Button>
<Spacing />
<Button textStyle={{ color: "blue" }}>
文本颜色{'textStyle={{color:"blue"}}'}
</Button>
<Spacing />
<Button color="#f6f8fa" textStyle={{ letterSpacing: 2 }}>
文本间距{'textStyle={{letterSpacing:3}}'}
</Button>
</Card>
<Card title="设置边框">
<Button bordered={false} color="#f6f8fa">
<Button bordered={false} color="#f6f8fa" >
不显示边框{'bordered={false}'}
</Button>
<Spacing />
Expand Down

0 comments on commit 95f808f

Please sign in to comment.