Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 新增分页控制 api & 完善inpu-number 尺寸类型 #694

Merged
merged 1 commit into from
Apr 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 108 additions & 0 deletions src/input-number/__tests__/__snapshots__/input-number.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,59 @@ exports[`size.jsx 1`] = `
<div
class="tdesign-demo-block-row"
>
<div
class="t-input-number t-size-s t-is-controls-right t-input-number--column"
>
<button
class="t-input-number__decrease t-button t-button--theme-default t-button--variant-outline t-button--shape-square"
type="button"
>
<svg
class="t-icon t-icon-chevron-down"
fill="none"
height="1em"
viewBox="0 0 16 16"
width="1em"
>
<path
d="M3.54 6.46l.92-.92L8 9.08l3.54-3.54.92.92L8 10.92 3.54 6.46z"
fill="currentColor"
fill-opacity="0.9"
/>
</svg>
</button>
<div
class="t-input__wrap"
>
<div
class="t-input"
>
<input
class="t-input__inner"
placeholder="请输入"
value="5"
/>
</div>
</div>
<button
class="t-input-number__increase t-button t-button--theme-default t-button--variant-outline t-button--shape-square"
type="button"
>
<svg
class="t-icon t-icon-chevron-up"
fill="none"
height="1em"
viewBox="0 0 16 16"
width="1em"
>
<path
d="M12.46 9.54l-.92.92L8 6.92l-3.54 3.54-.92-.92L8 5.08l4.46 4.46z"
fill="currentColor"
fill-opacity="0.9"
/>
</svg>
</button>
</div>
<div
class="t-input-number t-size-m t-is-controls-right t-input-number--column"
>
Expand Down Expand Up @@ -816,6 +869,61 @@ exports[`size.jsx 1`] = `
</button>
</div>
</div>
<div
class="tdesign-demo-block-row"
>
<div
class="t-input-number t-size-s t-input-number--normal"
>
<div
class="t-input__wrap"
>
<div
class="t-input"
>
<input
class="t-input__inner"
placeholder="请输入"
value="5"
/>
</div>
</div>
</div>
<div
class="t-input-number t-size-m t-input-number--normal"
>
<div
class="t-input__wrap"
>
<div
class="t-input"
>
<input
class="t-input__inner"
placeholder="请输入"
value="5"
/>
</div>
</div>
</div>
<div
class="t-input-number t-size-l t-input-number--normal"
>
<div
class="t-input__wrap"
>
<div
class="t-input"
>
<input
class="t-input__inner"
placeholder="请输入"
value="10"
/>
</div>
</div>
</div>
</div>
</div>
</DocumentFragment>
`;
Expand Down
7 changes: 7 additions & 0 deletions src/input-number/_example/size.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,16 @@ export default function InputNumberExample() {
</div>

<div className="tdesign-demo-block-row">
<InputNumber defaultValue={5} size="small" theme="column" onChange={console.log} />
<InputNumber defaultValue={5} theme="column" onChange={console.log} />
<InputNumber defaultValue={10} size="large" theme="column" onChange={console.log} />
</div>

<div className="tdesign-demo-block-row">
<InputNumber defaultValue={5} size="small" theme="normal" onChange={console.log} />
<InputNumber defaultValue={5} theme="normal" onChange={console.log} />
<InputNumber defaultValue={10} size="large" theme="normal" onChange={console.log} />
</div>
</div>
);
}
Loading