Skip to content

Commit 8363ca7

Browse files
committed
fix(SearchInputBar): 优化搜索栏样式
1 parent 7d34718 commit 8363ca7

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

packages/core/src/SearchInputBar/README.md

Lines changed: 15 additions & 14 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('')
@@ -45,13 +46,14 @@ function Demo() {
4546
value={value}
4647
placeholder="请输入搜索关键字"
4748
searchRender={
48-
<div
49-
style={{ display:'flex', alignItems:'center', padding: '0px 16px 0px 16px' }}
49+
<Button
50+
style={{ marginLeft: 15, background: 'rgb(240, 244, 247)' }}
51+
textStyle={{color:'block'}}
52+
type="link"
5053
>
51-
<label>搜索</label>
52-
</div>
54+
搜索
55+
</Button>
5356
}
54-
// actionName="搜一下"
5557
showActionButton
5658
/>
5759
)
@@ -77,17 +79,16 @@ function Demo() {
7779
onClear={()=>setValue('')}
7880
value={value}
7981
placeholder="请输入搜索关键字"
82+
showActionButton
8083
searchRender={
8184
<Button
82-
style={{ marginLeft: 20 }}
83-
type="light"
84-
onPress={()=>{
85-
console.log(inputRef.current.inputRef)
86-
}}
87-
>获取 输入框 Ref</Button>
88-
}
89-
actionName="搜一下"
90-
showActionButton
85+
style={{ marginLeft: 15, background: 'rgb(240, 244, 247)' }}
86+
textStyle={{color:'block'}}
87+
type="link"
88+
>
89+
获取输入框Ref
90+
</Button>
91+
}
9192
/>
9293
</View>
9394
)

0 commit comments

Comments
 (0)