From e7b337730dd4b00df56aa01ec3ed43b9339db2da Mon Sep 17 00:00:00 2001 From: MinJieLiu Date: Wed, 13 Jul 2022 08:12:44 +0800 Subject: [PATCH] fix: doc --- README.md | 2 +- packages/example/src/App.tsx | 6 +++++- packages/mac-scrollbar/README.md | 2 +- packages/mac-scrollbar/README.zh-CN.md | 2 +- packages/mac-scrollbar/package.json | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ddbd319..b1851b0 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ function App() { | Name | Type | Description | | :-- | :-- | :-- | -| skin | 'white' \| 'dark' | Adapt to the background color of the container. Default 'white' | +| skin | 'light' \| 'dark' | Adapt to the background color of the container. Default 'light' | | trackGap | number \| [startX: number, endX: number, startY: number, endY: number] | Gap at the cross end of the scroll bar. Default 16 | | trackStyle | (horizontal?: boolean) => CSSProperties | | | thumbStyle | (horizontal?: boolean) => CSSProperties | | diff --git a/packages/example/src/App.tsx b/packages/example/src/App.tsx index 2314724..8cbc969 100644 --- a/packages/example/src/App.tsx +++ b/packages/example/src/App.tsx @@ -122,7 +122,11 @@ function App() { ({ [horizontal ? 'height' : 'width']: 0 })} + trackStyle={(horizontal) => ({ + [horizontal ? 'height' : 'width']: 0, + right: 2, + border: 0, + })} thumbStyle={(horizontal) => ({ [horizontal ? 'height' : 'width']: 4 })} suppressAutoHide > diff --git a/packages/mac-scrollbar/README.md b/packages/mac-scrollbar/README.md index 6cd5ef3..66d579e 100644 --- a/packages/mac-scrollbar/README.md +++ b/packages/mac-scrollbar/README.md @@ -61,7 +61,7 @@ function App() { | Name | Type | Description | | :-- | :-- | :-- | -| skin | 'white' \| 'dark' | Adapt to the background color of the container. Default 'white' | +| skin | 'light' \| 'dark' | Adapt to the background color of the container. Default 'light' | | trackGap | number \| [startX: number, endX: number, startY: number, endY: number] | Gap at the cross end of the scroll bar. Default 16 | | trackStyle | (horizontal?: boolean) => CSSProperties | | | thumbStyle | (horizontal?: boolean) => CSSProperties | | diff --git a/packages/mac-scrollbar/README.zh-CN.md b/packages/mac-scrollbar/README.zh-CN.md index b5d04a2..5ca189d 100644 --- a/packages/mac-scrollbar/README.zh-CN.md +++ b/packages/mac-scrollbar/README.zh-CN.md @@ -61,7 +61,7 @@ function App() { | Name | Type | Description | | :-- | :-- | :-- | -| skin | 'white' \| 'dark' | 适应容器的滚动条主题,默认 'white' | +| skin | 'light' \| 'dark' | 适应容器的滚动条主题,默认 'light' | | trackGap | number \| [startX: number, endX: number, startY: number, endY: number] | 滚动条交叉末端的间隙,默认 16 | | trackStyle | (horizontal?: boolean) => CSSProperties | | | thumbStyle | (horizontal?: boolean) => CSSProperties | | diff --git a/packages/mac-scrollbar/package.json b/packages/mac-scrollbar/package.json index 3ab49a5..da24b5b 100644 --- a/packages/mac-scrollbar/package.json +++ b/packages/mac-scrollbar/package.json @@ -1,6 +1,6 @@ { "name": "mac-scrollbar", - "version": "0.10.1", + "version": "0.10.2", "description": "A macos style react scroll bar component", "author": "MinJieLiu ", "type": "module",