Skip to content

Commit e3401ee

Browse files
committed
docs: update docs
1 parent 444b9a0 commit e3401ee

12 files changed

Lines changed: 257 additions & 25 deletions

File tree

CHANGELOG.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,25 @@ Tiny UI strictly follows [Semantic Versioning 2.0.0](https://semver.org/).
88
- **z version**: patch version at the end of every week for routine bugfix (anytime for urgent bugfix).
99

1010

11+
## [1.0.2](https://github.com/wangdicoder/tiny-ui/compare/v1.0.1...v1.0.2) (2026-03-11)
12+
13+
### Bug Fixes
14+
15+
* CSSTransition issue ([5275a17](https://github.com/wangdicoder/tiny-ui/commit/5275a17))
16+
17+
### Refactors
18+
19+
* reuse Pagination component in Table and List ([444b9a0](https://github.com/wangdicoder/tiny-ui/commit/444b9a0))
20+
* unify component file structure so index.tsx only re-exports ([60bed2d](https://github.com/wangdicoder/tiny-ui/commit/60bed2d))
21+
22+
## [1.0.1](https://github.com/wangdicoder/tiny-ui/compare/v1.0.0...v1.0.1) (2026-03-10)
23+
24+
### Bug Fixes
25+
26+
* `<Pagination />` - prevent custom props from leaking to DOM element ([#41](https://github.com/wangdicoder/tiny-ui/issues/41)) ([4b5103a](https://github.com/wangdicoder/tiny-ui/commit/4b5103a))
27+
* `<Grid />` - accept single Col element in RowProps ([#36](https://github.com/wangdicoder/tiny-ui/issues/36)) ([6edf326](https://github.com/wangdicoder/tiny-ui/commit/6edf326))
28+
* CSSTransition issue ([5275a17](https://github.com/wangdicoder/tiny-ui/commit/5275a17))
29+
1130
## [1.0.0](https://github.com/wangdicoder/tiny-ui/compare/v0.0.94...v1.0.0) (2026-03-10)
1231

1332
### Features
@@ -26,7 +45,6 @@ Tiny UI strictly follows [Semantic Versioning 2.0.0](https://semver.org/).
2645

2746
### Bug Fixes
2847

29-
* `<Pagination />` - prevent custom props from leaking to DOM element ([#41](https://github.com/wangdicoder/tiny-ui/issues/41)) ([4b5103a](https://github.com/wangdicoder/tiny-ui/commit/4b5103a))
3048
* `<BackTop />` - reset native button styles and support custom children ([095da1e](https://github.com/wangdicoder/tiny-ui/commit/095da1e))
3149
* `<Tabs />` - reduce editable-card add button size to match tab height ([492cd06](https://github.com/wangdicoder/tiny-ui/commit/492cd06))
3250
* `<ColorPicker />` - show not-allowed cursor in disabled state ([17eba92](https://github.com/wangdicoder/tiny-ui/commit/17eba92))

components/anchor/anchor.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,25 @@ const Anchor = (props: AnchorProps): JSX.Element => {
119119

120120
let newActiveId = '';
121121
let maxTop = -Infinity;
122+
let firstId = '';
123+
let firstTop = Infinity;
122124
links.forEach((href) => {
123125
const id = href.replace('#', '');
124126
const el = document.getElementById(id);
125127
if (!el) return;
126128
const elTop = el.getBoundingClientRect().top - containerTop;
129+
if (elTop < firstTop) {
130+
firstTop = elTop;
131+
firstId = id;
132+
}
127133
if (elTop <= offsetTop && elTop > maxTop) {
128134
maxTop = elTop;
129135
newActiveId = id;
130136
}
131137
});
138+
if (!newActiveId && firstId) {
139+
newActiveId = firstId;
140+
}
132141

133142
setActiveId((prev) => {
134143
if (prev !== newActiveId) {

components/message/demo/type.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ Messages of `info`, `success`, `warning`, `error` and `loading` types.
1111
};
1212

1313
return (
14-
<>
14+
<Flex gap="sm">
1515
<Button btnType="info" onClick={() => onClick('info')}>Info</Button>
1616
<Button btnType="success" onClick={() => onClick('success')}>Success</Button>
1717
<Button btnType="warning" onClick={() => onClick('warning')}>Warning</Button>
1818
<Button btnType="danger" onClick={() => onClick('error')}>Error</Button>
1919
<Button btnType="info" onClick={() => onClick('loading')}>Loading</Button>
20-
</>
20+
</Flex>
2121
);
2222
}
2323
```

components/modal/demo/animation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Use `animation` to set different popup animation.
1111
const [visible2, setVisible2] = React.useState(false);
1212

1313
return (
14-
<>
14+
<Flex gap="sm">
1515
<Button btnType="primary" onClick={() => setVisible1(true)}>
1616
Default Slide up and down
1717
</Button>
@@ -37,7 +37,7 @@ Use `animation` to set different popup animation.
3737
<div>Some contents...</div>
3838
<div>Some contents...</div>
3939
</Modal>
40-
</>
40+
</Flex>
4141
);
4242
};
4343

components/modal/modal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useContext, useEffect, useId, useRef, useState } from 'react';
22
import classNames from 'classnames';
33
import { CSSTransition } from 'react-transition-group';
44
import Overlay from '../overlay';
5-
import Button from '../button/button';
5+
import { Button, Flex } from '..';
66
import { ConfigContext } from '../config-provider/config-context';
77
import { getPrefixCls } from '../_utils/general';
88
import { useLocale } from '../_utils/use-locale';
@@ -99,7 +99,7 @@ const Modal = React.forwardRef<HTMLDivElement, ModalProps>((props, ref) => {
9999
return null;
100100
} else {
101101
return (
102-
<div className={`${prefixCls}__footer`} style={footerStyle}>
102+
<Flex gap="sm" justify='end' className={`${prefixCls}__footer`} style={footerStyle}>
103103
<Button onClick={onCancel} className={`${prefixCls}__footer-btn`} {...cancelButtonProps}>
104104
{cancelText}
105105
</Button>
@@ -111,7 +111,7 @@ const Modal = React.forwardRef<HTMLDivElement, ModalProps>((props, ref) => {
111111
{...confirmButtonProps}>
112112
{confirmText}
113113
</Button>
114-
</div>
114+
</Flex>
115115
);
116116
}
117117
};

components/notification/demo/placement.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,15 @@ A notification box can appear from the `topRight`, `bottomRight`, `bottomLeft` o
1616

1717
return (
1818
<>
19-
<Button btnType="primary" onClick={() => btnOnClick('topLeft')}>Top Left</Button>
20-
<Button btnType="primary" onClick={() => btnOnClick('topRight')}>Top Right</Button>
19+
<Flex gap="sm">
20+
<Button btnType="primary" onClick={() => btnOnClick('topLeft')}>Top Left</Button>
21+
<Button btnType="primary" onClick={() => btnOnClick('topRight')}>Top Right</Button>
22+
</Flex>
2123
<br />
22-
<br />
23-
<Button btnType="primary" onClick={() => btnOnClick('bottomLeft')}>Bottom Left</Button>
24-
<Button btnType="primary" onClick={() => btnOnClick('bottomRight')}>Bottom Right</Button>
24+
<Flex gap="sm">
25+
<Button btnType="primary" onClick={() => btnOnClick('bottomLeft')}>Bottom Left</Button>
26+
<Button btnType="primary" onClick={() => btnOnClick('bottomRight')}>Bottom Right</Button>
27+
</Flex>
2528
</>
2629
);
2730
}

components/notification/demo/type.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ A notification box with a icon at the left side.
1717
};
1818

1919
return (
20-
<>
20+
<Flex gap="sm">
2121
<Button btnType="info" onClick={() => btnOnClick('info')}>Info</Button>
2222
<Button btnType="success" onClick={() => btnOnClick('success')}>Success</Button>
2323
<Button btnType="warning" onClick={() => btnOnClick('warning')}>Warning</Button>
2424
<Button btnType="danger" onClick={() => btnOnClick('error')}>Error</Button>
25-
</>
25+
</Flex>
2626
);
2727
}
2828
```

components/result/demo/success.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ Show successful results.
99
status="success"
1010
title="Successfully Purchased Cloud Server ECS!"
1111
subtitle="Order number: 2017182818828182881 Cloud server configuration takes 1-5 minutes, please wait."
12-
extra={[
13-
<Button btnType="primary" key="console">
14-
Go Console
15-
</Button>,
16-
<Button key="buy">Buy Again</Button>,
17-
]}
12+
extra={
13+
<Flex gap="sm" justify="center">
14+
<Button btnType="primary" key="console">
15+
Go Console
16+
</Button>
17+
<Button key="buy">Buy Again</Button>
18+
</Flex>
19+
}
1820
/>
1921
```
2022

dist/tiny.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/tiny.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)