-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(design): Add password, showCount and allowClear demo for Input
- Loading branch information
1 parent
edc7290
commit 2268cf6
Showing
4 changed files
with
53 additions
and
0 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,17 @@ | ||
import React from 'react'; | ||
import { Input, Space } from '@oceanbase/design'; | ||
|
||
const { TextArea } = Input; | ||
|
||
const onChange = (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => { | ||
console.log(e); | ||
}; | ||
|
||
const App: React.FC = () => ( | ||
<Space direction="vertical" style={{ width: '100%' }}> | ||
<Input defaultValue="Input with clear icon" allowClear onChange={onChange} /> | ||
<TextArea defaultValue="TextArea with clear icon" allowClear onChange={onChange} /> | ||
</Space> | ||
); | ||
|
||
export default App; |
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,16 @@ | ||
import React from 'react'; | ||
import { Input, Space } from 'antd'; | ||
|
||
const App: React.FC = () => { | ||
return ( | ||
<Space direction="vertical" style={{ width: '100%' }}> | ||
<Input.Password placeholder="auto fill password by default" /> | ||
<Input.Password | ||
autoComplete="new-password" | ||
placeholder='not auto fill password with autoComplete="new-password"' | ||
/> | ||
</Space> | ||
); | ||
}; | ||
|
||
export default App; |
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,17 @@ | ||
import React from 'react'; | ||
import { Input, Space } from '@oceanbase/design'; | ||
|
||
const { TextArea } = Input; | ||
|
||
const onChange = (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => { | ||
console.log('Change:', e.target.value); | ||
}; | ||
|
||
const App: React.FC = () => ( | ||
<Space direction="vertical" style={{ width: '100%' }}> | ||
<Input showCount maxLength={20} onChange={onChange} /> | ||
<TextArea showCount maxLength={100} onChange={onChange} /> | ||
</Space> | ||
); | ||
|
||
export default App; |
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