-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2745 from XiaoMi/feature/select/2742
feat(input&select): add prefix and suffix api
- Loading branch information
Showing
9 changed files
with
94 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@hi-ui/input": minor | ||
"@hi-ui/select": minor | ||
--- | ||
|
||
feat: add prefix api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@hi-ui/hiui": patch | ||
--- | ||
|
||
feat(input&select): add prefix api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React from 'react' | ||
import Select from '../src' | ||
import { AppStoreOutlined, InfoCircleOutlined } from '@hi-ui/icons' | ||
|
||
/** | ||
* @title 前后内置元素 | ||
* @desc 将选择框与内置的其他元素组合使用 | ||
*/ | ||
export const Addon = () => { | ||
const [data] = React.useState([ | ||
{ title: '电视', id: '3', disabled: false }, | ||
{ title: '手机', id: '2' }, | ||
{ title: '笔记本', id: '4', disabled: false }, | ||
{ | ||
title: '生活周边超长文案展示超长文案展示', | ||
id: '5', | ||
}, | ||
{ title: '办公', id: '6' }, | ||
{ title: '生活周边7', id: '7' }, | ||
{ title: '办公8', id: '8' }, | ||
]) | ||
|
||
return ( | ||
<> | ||
<h1>Addon</h1> | ||
<div className="select-addon__wrap"> | ||
<Select | ||
style={{ width: 240 }} | ||
// clearable={false} | ||
data={data} | ||
prefix={<AppStoreOutlined style={{ color: '#333' }} />} | ||
suffix={<InfoCircleOutlined style={{ color: '#333' }} />} | ||
/> | ||
</div> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters