-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(Textarea): complete refactoring
- Loading branch information
Showing
22 changed files
with
347 additions
and
75 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
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,24 @@ | ||
import React from 'react'; | ||
import { Textarea } from 'tdesign-mobile-react'; | ||
|
||
export default function TextareaCard() { | ||
return ( | ||
<> | ||
<div className="card textarea-example__card"> | ||
<Textarea | ||
className="textarea" | ||
label="标签文字" | ||
placeholder="请输入文字" | ||
maxlength={500} | ||
indicator | ||
layout="vertical" | ||
/> | ||
</div> | ||
|
||
<div className="card textarea-example__card card"> | ||
<div className="textarea-example__summary">卡片样式</div> | ||
<Textarea className="textarea" label="标签文字" placeholder="请输入文字" maxlength={500} indicator /> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from 'react'; | ||
import { Textarea } from 'tdesign-mobile-react'; | ||
|
||
export default function Events() { | ||
return ( | ||
<> | ||
<div className="custom textarea-example__custom "> | ||
<text className="textarea-example__label">标签文字</text> | ||
<Textarea className="textarea" placeholder="请输入文字" bordered maxlength={100} indicator /> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from 'react'; | ||
import { Textarea } from 'tdesign-mobile-react'; | ||
|
||
export default function Type() { | ||
return ( | ||
<Textarea className="textarea-example" label="标签文字" placeholder="请输入文字" value="不可编辑文字" disabled /> | ||
); | ||
} |
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 was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,20 @@ | ||
import React, { useState } from 'react'; | ||
import { Textarea } from 'tdesign-mobile-react'; | ||
import type { TextareaProps } from 'tdesign-mobile-react'; | ||
|
||
export default function Maxlength() { | ||
const [value, onChange] = useState<TextareaProps['value']>(''); | ||
return ( | ||
<Textarea | ||
placeholder="请输入文字" | ||
label="标签文字" | ||
maxcharacter={100} | ||
indicator | ||
value={value} | ||
onChange={(value) => { | ||
console.log(value); | ||
onChange(value); | ||
}} | ||
/> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.