Skip to content

Commit 989894b

Browse files
committed
Merge branch 'dev' of https://github.com/uiwjs/react-native-uiw into dev
2 parents 4b75fa0 + 8564584 commit 989894b

File tree

12 files changed

+48
-35
lines changed

12 files changed

+48
-35
lines changed

packages/core/src/Pagination/DirText.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const DirText = (props: DirTextProps) => {
3838
{
3939
minWidth: containerSize[size],
4040
borderColor: borderColor,
41+
backgroundColor: '#fff',
4142
paddingHorizontal: icon ? 0 : 5,
4243
opacity: disabled ? disabledStyle : disabledStyle - 0.2,
4344
},

packages/core/src/Radio/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ function Demo() {
1616
<Radio>Radio</Radio>
1717
<Radio checked>Radio checked</Radio>
1818
</>
19-
2019
);
2120
}
2221

@@ -66,7 +65,7 @@ export default Demo
6665

6766
### 单选
6867

69-
```jsx mdx:preview
68+
```jsx mdx:preview&background=#bebebe29
7069
import React, { useState } from 'react';
7170
import { View } from 'react-native';
7271
import { Radio } from '@uiw/react-native';

packages/core/src/Rating/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default Demo
4646

4747
### 默认选中及总数
4848

49-
```jsx mdx:preview
49+
```jsx mdx:preview&background=#bebebe29
5050
import React from 'react';
5151
import { Rating, Icon } from '@uiw/react-native';
5252
function Demo() {
@@ -68,7 +68,7 @@ export default Demo
6868

6969
### 评分组件加上文案展示及样式修改
7070

71-
```jsx mdx:preview
71+
```jsx mdx:preview&background=#bebebe29
7272
import React from 'react';
7373
import { Rating, Icon } from '@uiw/react-native';
7474

@@ -83,7 +83,7 @@ export default Demo
8383

8484
### 只读
8585

86-
```jsx mdx:preview
86+
```jsx mdx:preview&background=#bebebe29
8787
import React from 'react';
8888
import { Rating, Icon } from '@uiw/react-native';
8989
function Demo() {

packages/core/src/SearchInputBar/README.md

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export default Demo
3535
```jsx mdx:preview&background=#bebebe29
3636
import React, { useState } from 'react';
3737
import SearchInputBar from '@uiw/react-native/lib/SearchInputBar';
38+
import { Button } from '@uiw/react-native';
3839

3940
function Demo() {
4041
const [value, setValue] = useState('')
@@ -44,8 +45,15 @@ function Demo() {
4445
onClear={()=>setValue('')}
4546
value={value}
4647
placeholder="请输入搜索关键字"
47-
searchRender={<div style={{ display:'flex', alignItems:'center' }}><label>搜索</label></div>}
48-
actionName="搜一下"
48+
searchRender={
49+
<Button
50+
style={{ marginLeft: 15, background: 'rgb(240, 244, 247)' }}
51+
textStyle={{color:'block'}}
52+
type="link"
53+
>
54+
搜索
55+
</Button>
56+
}
4957
showActionButton
5058
/>
5159
)
@@ -57,33 +65,32 @@ export default Demo
5765
### 获取输入框 Ref
5866
```jsx mdx:preview&background=#bebebe29
5967
import React, { useState, Fragment, useRef } from 'react';
68+
import { View } from 'react-native';
6069
import { SearchInputBar, Button } from '@uiw/react-native';
6170

6271
function Demo() {
6372
const inputRef = useRef()
6473
const [value, setValue] = useState('')
6574
return (
66-
<Fragment>
75+
<View>
6776
<SearchInputBar
6877
ref={inputRef}
6978
onChangeText={setValue}
7079
onClear={()=>setValue('')}
7180
value={value}
7281
placeholder="请输入搜索关键字"
73-
actionName="搜一下"
7482
showActionButton
75-
button={{
76-
onPress() {
77-
// 点击搜索按钮触法
78-
}
79-
}}
83+
searchRender={
84+
<Button
85+
style={{ marginLeft: 15, background: 'rgb(240, 244, 247)' }}
86+
textStyle={{color:'block'}}
87+
type="link"
88+
>
89+
获取输入框Ref
90+
</Button>
91+
}
8092
/>
81-
<Button
82-
onPress={()=>{
83-
console.log(inputRef.current.inputRef)
84-
}}
85-
>获取 输入框 Ref</Button>
86-
</Fragment>
93+
</View>
8794
)
8895
}
8996
export default Demo

packages/core/src/Slider/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ function Demo() {
8585
<Slider
8686
value={value}
8787
onChange={(cValue) => setValue(cValue)}
88-
thumbTintColor="pink"
89-
maximumTrackTintColor="pink"
90-
minimumTrackTintColor="purple"
88+
thumbTintColor="#008ef0"
89+
maximumTrackTintColor="#333"
90+
minimumTrackTintColor="white"
9191
/>
9292
);
9393
}

packages/core/src/Stepper/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ function Demo() {
8383
value={value}
8484
disabled={true}
8585
width={150}
86-
color={{color: '#ccc',borderColor: '#999',controlColor: 'red',valueColor: '#000'}}
8786
onChange={(value)=>{
8887
setValue(value)
8988
}}

packages/core/src/Switch/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ import React from 'react';
4444
function Demo() {
4545
return (
4646
<Switch
47-
color="red"
48-
thumbStyle={{backgroundColor: 'skyblue'}}
49-
trackStyle={{backgroundColor: 'pink'}}
47+
color="#008ef055"
48+
thumbStyle={{backgroundColor: '#333a'}}
49+
trackStyle={{backgroundColor: '#008ef0'}}
5050
/>
5151
);
5252
}

packages/core/src/Tabs/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Tabs 选项卡
99
### 基础示例
1010

1111
```jsx mdx:preview&background=#bebebe29
12-
import React, { Fragment } from 'react';
12+
import React, { Fragment, useState } from 'react';
1313
import { Tabs } from '@uiw/react-native';
1414
const { Item } = Tabs
1515
function Demo() {
@@ -29,7 +29,7 @@ export default Demo
2929
### 使用 Icon
3030

3131
```jsx mdx:preview&background=#bebebe29
32-
import React, { Fragment } from 'react';
32+
import React, { Fragment, useState } from 'react';
3333
import { Tabs, Icon } from '@uiw/react-native';
3434
function Demo() {
3535
const [value,setValue]= useState(0)
@@ -65,7 +65,7 @@ export default Demo
6565
### 选中色更改
6666

6767
```jsx mdx:preview&background=#bebebe29
68-
import React, { Fragment } from 'react';
68+
import React, { Fragment, useState } from 'react';
6969
import { Tabs, Icon } from '@uiw/react-native';
7070
function Demo() {
7171
const [value,setValue]= useState(0)

packages/core/src/Tabs/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const styles = StyleSheet.create({
6969
},
7070
TabsContainer: {
7171
backgroundColor: '#fff',
72-
minWidth: 1 * MainWidth,
72+
maxWidth: 1 * MainWidth,
7373
display: 'flex',
7474
justifyContent: 'space-between',
7575
alignItems: 'center',

packages/core/src/TextArea/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import TextArea from '@uiw/react-native/lib/TextArea';
1313
function Demo() {
1414
return (
1515
<TextArea
16+
fontStyle={{ color:'#aaa' }}
1617
value={"Hello TextArea \nplease input word"}
1718
placeholder='请输入'
1819
/>
@@ -35,6 +36,7 @@ function Demo() {
3536
console.log('输入内容: ', value);
3637
setValue(value);
3738
}}
39+
fontStyle={{ color:'#aaa' }}
3840
value={value}
3941
placeholder='请输入'
4042
/>
@@ -55,6 +57,7 @@ function Demo() {
5557

5658
return (
5759
<TextArea
60+
fontStyle={{ color:'#aaa' }}
5861
editable={false}
5962
value={value}
6063
placeholder='请输入'
@@ -78,6 +81,7 @@ function Demo() {
7881
onChange={(value) => {
7982
setValue(value);
8083
}}
84+
fontStyle={{ color:'#aaa' }}
8185
maxLength={100}
8286
showWords={true}
8387
value={value}
@@ -102,6 +106,7 @@ function Demo() {
102106
onChange={(value) => {
103107
setValue(value);
104108
}}
109+
fontStyle={{ color:'#aaa' }}
105110
numberOfLines={3}
106111
value={value}
107112
placeholder='请输入'
@@ -127,6 +132,7 @@ function Demo() {
127132
onChange={(value) => {
128133
setValue(value);
129134
}}
135+
fontStyle={{ color:'#aaa' }}
130136
placeholder='请输入'
131137
autoSize
132138
/>
@@ -177,6 +183,7 @@ function Demo() {
177183
setValue(value);
178184
}}
179185
textAlignVertical="center"
186+
fontStyle={{ color:'#aaa' }}
180187
value={value}
181188
placeholder='请输入'
182189
/>

0 commit comments

Comments
 (0)