Skip to content

Commit

Permalink
fix: DatePicker default placeholder remove "Please"
Browse files Browse the repository at this point in the history
* fix: DatePicker default placeholder remove "Please" arco-design#2707

* fix: Remove the "please" in the placeholder of the demo component

---------

Co-authored-by: changzhn <[email protected]>
  • Loading branch information
changzhn and changzhn authored Jul 1, 2024
1 parent d4dbc68 commit 613245a
Show file tree
Hide file tree
Showing 29 changed files with 173 additions and 138 deletions.
8 changes: 4 additions & 4 deletions components/Input/__demo__/addon.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const App = () => {
return (
<Space direction="vertical">
<Space wrap>
<Input style={{ width: 350 }} addAfter="RMB" placeholder="Please enter" />
<Input style={{ width: 350 }} addBefore="+86" placeholder="Please enter" />
<Input style={{ width: 350 }} addAfter="RMB" placeholder="Enter amount" />
<Input style={{ width: 350 }} addBefore="+86" placeholder="Enter phone number" />
</Space>
<Space wrap>
<Input
Expand All @@ -37,9 +37,9 @@ const App = () => {
</Select>
}
allowClear
placeholder="Please enter"
placeholder="Enter host"
/>
<Input style={{ width: 350 }} addBefore="www." addAfter=".com" placeholder="Please enter" />
<Input style={{ width: 350 }} addBefore="www." addAfter=".com" placeholder="Enter host" />
</Space>
</Space>
);
Expand Down
6 changes: 4 additions & 2 deletions components/Input/__demo__/autoWidth.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,24 @@ const App = () => {
</Divider>

<Input
placeholder="Please Enter"
placeholder="Enter something"
autoWidth={{ maxWidth: 500}}
/>

<Divider>
<Typography.Text code>{JSON.stringify({minWidth: 300, maxWidth: 500})}</Typography.Text>
</Divider>

<Input autoWidth={{minWidth: 300, maxWidth: 500}}/>
<Input autoWidth={{minWidth: 300, maxWidth: 500}} placeholder="Enter something" />
<br/><br/>
<Input
placeholder="Enter something"
prefix="Prefix"
autoWidth={{minWidth: 300, maxWidth: 500}}
/>
<br/><br/>
<Input
placeholder="Enter something"
addBefore="Before"
prefix="Prefix"
autoWidth={{minWidth: 300, maxWidth: 500}}
Expand Down
2 changes: 1 addition & 1 deletion components/Input/__demo__/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Input content via mouse or keyboard.
import { Input } from '@arco-design/web-react';

const App = () => {
return <Input style={{ width: 350 }} allowClear placeholder="Please Enter something" />;
return <Input style={{ width: 350 }} allowClear placeholder="Enter something" />;
};

export default App;
Expand Down
2 changes: 1 addition & 1 deletion components/Input/__demo__/group.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const App = () => {
<Select.Option value="Tianjin">Tianjin</Select.Option>
<Select.Option value="Shanghai">Shanghai</Select.Option>
</Select>
<Input style={{ width: '75%' }} placeholder="Please enter an address" />
<Input style={{ width: '75%' }} placeholder="Enter an address" />
</Input.Group>
</div>
<div
Expand Down
4 changes: 2 additions & 2 deletions components/Input/__demo__/max-length.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ function App() {
<Input
maxLength={10}
showWordLimit
placeholder="Please enter no more than 10 letters"
placeholder="Enter no more than 10 letters"
style={{ width: 300 }}
/>
<Input.TextArea
maxLength={50}
showWordLimit
placeholder="Please enter no more than 50 letters"
placeholder="Enter no more than 50 letters"
wrapperStyle={{ width: 300 }}
/>
</Space>
Expand Down
2 changes: 2 additions & 0 deletions components/Input/__demo__/normalize.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const App = () => {
<div>
<Typography.Paragraph>trim whitespace when out of focus:</Typography.Paragraph>
<Input
placeholder="Enter something"
onChange={v => { console.log('current value: ', v); }}
normalizeTrigger={['onBlur']}
normalize={v => v ? v.trim() : v}
Expand All @@ -32,6 +33,7 @@ const App = () => {

<Typography.Paragraph>trim whitespace when press enter:</Typography.Paragraph>
<Input
placeholder="Enter something"
onChange={v => { console.log('current value: ', v); }}
normalize={v => v ? v.trim() : v}
normalizeTrigger={['onPressEnter']}
Expand Down
2 changes: 1 addition & 1 deletion components/Input/__demo__/password.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const App = () => {
<Input.Password
defaultValue="password"
defaultVisibility={true}
placeholder="Please enter ..."
placeholder="Enter password"
style={{ width: 350 }}
/>
</Space>
Expand Down
8 changes: 4 additions & 4 deletions components/Input/__demo__/prefix_suffix.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ const App = () => {
return (
<Space direction="vertical">
<Space wrap>
<Input style={{ width: 350 }} prefix={<IconUser />} placeholder="Please enter" />
<Input style={{ width: 350 }} prefix={<IconUser />} placeholder="Enter something" />
<Input
allowClear
style={{ width: 350 }}
suffix={<IconInfoCircle />}
placeholder="Please enter"
placeholder="Enter something"
/>
</Space>
<Space wrap>
<Input
style={{ width: 350 }}
prefix={<IconUser />}
suffix={<IconInfoCircle />}
placeholder="Please enter"
placeholder="Enter something"
/>
<Input
style={{ width: 350 }}
Expand All @@ -43,7 +43,7 @@ const App = () => {
prefix={<IconUser />}
suffix={<IconInfoCircle />}
allowClear
placeholder="Please enter"
placeholder="Enter something"
/>
</Space>
</Space>
Expand Down
18 changes: 9 additions & 9 deletions components/Input/__demo__/size.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,27 +80,27 @@ class App extends React.Component {
{...props}
style={{ width: 350, margin: 12 }}
prefix={<IconClockCircle />}
placeholder="Please enter something"
placeholder="Enter something"
/>
<Input
{...props}
style={{ width: 350, margin: 12 }}
suffix={<IconInfoCircle />}
placeholder="Please enter something"
placeholder="Enter something"
/>
</div>
<div>
<Input
{...props}
style={{ width: 350, margin: 12 }}
addAfter="KG"
placeholder="Please enter something"
placeholder="Enter something"
/>
<Input
{...props}
style={{ width: 350, margin: 12 }}
addBefore="+86"
placeholder="Please enter something"
placeholder="Enter phone number"
/>
</div>
<div>
Expand All @@ -112,11 +112,11 @@ class App extends React.Component {
prefix={<IconClockCircle />}
suffix={<IconInfoCircle />}
allowClear
placeholder="Please enter something"
placeholder="Enter phone number"
/>
<InputSearch
{...props}
placeholder="Please enter something"
placeholder="Enter something"
style={{ width: 350, margin: 12 }}
searchButton={true}
/>
Expand All @@ -126,19 +126,19 @@ class App extends React.Component {
{...props}
style={{ width: 350, margin: 12 }}
addBefore={
<Select size={size} placeholder="Please select" style={{ width: 100 }}>
<Select size={size} placeholder="Select protocol" style={{ width: 100 }}>
<Select.Option value="http://">http://</Select.Option>
<Select.Option value="https://">https://</Select.Option>
</Select>
}
allowClear={true}
placeholder="Please enter something"
placeholder="Enter something"
/>
<Input
{...props}
style={{ width: 350, margin: 12 }}
allowClear={true}
placeholder="Please enter something"
placeholder="Enter something"
/>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/Input/__demo__/textarea.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const TextArea = Input.TextArea;
const App = () => {
return (
<Space wrap>
<TextArea placeholder="Please enter ..." style={{ minHeight: 64, width: 350 }} />
<TextArea placeholder="Enter something" style={{ minHeight: 64, width: 350 }} />
<TextArea defaultValue="Disabled" style={{ minHeight: 64, width: 350 }} disabled />
</Space>
);
Expand Down
4 changes: 2 additions & 2 deletions components/Input/__demo__/textarea_autosize.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ const App = () => {
return (
<Space wrap align="top">
<TextArea
placeholder="Please enter ..."
placeholder="Enter something"
defaultValue="This is the contents of the textarea. "
autoSize
style={{ width: 350 }}
/>
<TextArea
placeholder="Please enter ..."
placeholder="Enter something"
autoSize={{ minRows: 2, maxRows: 6 }}
style={{ width: 350 }}
defaultValue="This is the contents of the textarea. This is the contents of the textarea. This is the contents of the textarea. "
Expand Down
Loading

0 comments on commit 613245a

Please sign in to comment.