Skip to content

Commit 6a99420

Browse files
Tomasz LuczakTomasz Luczak
authored andcommitted
document disableDefaultStyles; use lower case for type description
1 parent 9b5408d commit 6a99420

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

docs/API.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@ order: 4
99
| Property | Description | Type | Default |
1010
| --- | --- | --- | --- |
1111
| autoHeight | Enable auto-height mode. When `true` container grows with content | `boolean` | `false` |
12-
| autoHeightMax | Set a minimum height for auto-height mode. Ignoring if **autoHeight** is `false` | `Number` | 0 |
13-
| autoHeightMin | Set a maximum height for auto-height mode. Ignoring if **autoHeight** is `false`| `Number` | 200 |
12+
| autoHeightMax | Set a minimum height for auto-height mode. Ignoring if **autoHeight** is `false` | `number` | 0 |
13+
| autoHeightMin | Set a maximum height for auto-height mode. Ignoring if **autoHeight** is `false`| `number` | 200 |
1414
| autoHide | Enable auto-hide mode. When `true` tracks will hide automatically and are only visible while scrolling. | `boolean` | `false` |
15-
| autoHideDuration | Duration for hide animation in ms. | `Number` | 200 |
16-
| autoHideTimeout | Hide delay in ms. | `Number` | 1000 |
15+
| autoHideDuration | Duration for hide animation in ms. | `number` | 200 |
16+
| autoHideTimeout | Hide delay in ms. | `number` | 1000 |
1717
| classes | extra custom className/s to any of the subcomponents | <code>Partial<Record<'root' &#124; 'view' &#124; 'trackVertical' &#124; 'trackHorizontal' &#124; 'thumbVertical' &#124; 'thumbHorizontal', string></code> | `{}`
1818
| className | className for the root component | `string` | `undefined`
19-
| hideTracksWhenNotNeeded | Hide tracks (`visibility: hidden`) when content does not overflow container. | `Boolean` | `false` |
19+
| disableDefaultStyles | removes basic styling to ease visual customization | `boolean` | `false`
20+
| hideTracksWhenNotNeeded | Hide tracks (`visibility: hidden`) when content does not overflow container. | `boolean` | `false` |
2021
| onScroll | Event handler | `(e: React.UIEvent<HTMLElement>) => void` | `undefined` |
2122
| onScrollFrame | Runs inside the animation frame. Type of `ScrollValues` you can check below | `(values: ScrollValues) => void` | `undefined` |
2223
| onScrollStart | Called when scrolling starts | `() => void` | `undefined` |
@@ -27,10 +28,9 @@ order: 4
2728
| renderTrackHorizontal | Horizontal track element | `(props: HTMLAttributes<HTMLDivElement>) => JSX.Element` | `undefined` |
2829
| renderTrackVertical | Vertical track element | `(props: HTMLAttributes<HTMLDivElement>) => JSX.Element` | `undefined` |
2930
| renderView | The element your content will be rendered in | `(props: HTMLAttributes<HTMLDivElement>) => JSX.Element` | `undefined` |
30-
| thumbMinSize | The element your content will be rendered in | `Number` | 30 |
31-
| thumbSize | The element your content will be rendered in | `Number or undefined` | `undefined` |
32-
| universal | Enable universal rendering (SSR). [Learn how to use universal rendering](/usage#universal-rendering) | `Boolean` | `false` |
33-
31+
| thumbMinSize | The element your content will be rendered in | `number` | 30 |
32+
| thumbSize | The element your content will be rendered in | `number or undefined` | `undefined` |
33+
| universal | Enable universal rendering (SSR). [Learn how to use universal rendering](/usage#universal-rendering) | `boolean` | `false` |
3434

3535
### ScrollValues
3636
```typescript

docs/customization.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ For convenience, some 'marker' classes are provided for each of the subcomponent
7575
`trackHorizontal`: 'rc-scrollbars-track rc-scrollbars-track-h'
7676
`thumbVertical`: 'rc-scrollbars-thumb rc-scrollbars-thumb-v'
7777
`thumbHorizontal`: 'rc-scrollbars-thumb rc-scrollbars-thumb-h'
78+
79+
There's very little 'beautifying' styles applied by default, however if you'd like to change the `background-color` of the **thumbs** or `border-radius` of the **tracks** you can easily disable their default styling by passing a single prop `disableDefaultStyles`.
7880

7981
## Respond to scroll events
8082

0 commit comments

Comments
 (0)