Skip to content

Commit

Permalink
fix anchor links in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rommguy committed Jan 31, 2024
1 parent 6bf4937 commit a3bb933
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ This prop will override any value given to heightRelativeToParent when setting t
- **minScrollHandleHeight** : number, sets the mimimum height of the scroll handle. Default is 38, as in Chrome on OSX.
- **rtl** : boolean, default false. Right to left document, will place the custom scrollbar on the left side of the content, and assume the native one is also there.
- **scrollTo**: number, default undefined. Will scroll content to the given value.
- **keepAtBottom**: boolean, default false. For dynamic content, will keep the scroll position at the bottom of the content, when the content changes, if the position was at the bottom before the change. [See example here](http://rommguy.github.io/react-custom-scroll/example/demo.html?dynamic=true)
- **keepAtBottom**: boolean, default false. For dynamic content, will keep the scroll position at the bottom of the content, when the content changes, if the position was at the bottom before the change. [See example here](http://rommguy.github.io/react-custom-scroll/example/demo.html#with-dynamic-content)
- **className**: string, default undefined. Allows adding your own class name to the root element.

##### Example for heightRelativeToParent
Expand All @@ -87,7 +87,7 @@ starting with lower case causes JSX to treat the tag as a native dom element
- You can use CustomScroll types by installing @types/react-custom-scroll from npm

### Usage with flexbox
##### See a [demo with Flex](http://rommguy.github.io/react-custom-scroll/example/demo.html?flex=true) ###
##### See a [demo with Flex](http://rommguy.github.io/react-custom-scroll/example/demo.html#with-flex) ###
There are some details that apply when using customScroll on elements with size set by css flex.
Here is an example for an HTML structure before using customScroll:

Expand Down
31 changes: 31 additions & 0 deletions vite.config.ts.timestamp-1706665317733-460586ad0276b.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// vite.config.ts
import { defineConfig } from "file:///Users/guyromm/myprojects/react-custom-scroll-revamp/node_modules/vite/dist/node/index.js";
import react from "file:///Users/guyromm/myprojects/react-custom-scroll-revamp/node_modules/@vitejs/plugin-react-swc/index.mjs";
import path from "path";
import dts from "file:///Users/guyromm/myprojects/react-custom-scroll-revamp/node_modules/vite-plugin-dts/dist/index.mjs";
var __vite_injected_original_dirname = "/Users/guyromm/myprojects/react-custom-scroll-revamp";
var vite_config_default = defineConfig({
build: {
lib: {
entry: path.resolve(__vite_injected_original_dirname, "index.ts"),
name: "react-custom-scroll",
fileName: (format) => `index.${format}.js`
},
rollupOptions: {
external: ["react", "react-dom"],
output: {
globals: {
react: "React",
"react-dom": "ReactDOM"
}
}
},
sourcemap: true,
emptyOutDir: true
},
plugins: [react(), dts()]
});
export {
vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCIvVXNlcnMvZ3V5cm9tbS9teXByb2plY3RzL3JlYWN0LWN1c3RvbS1zY3JvbGwtcmV2YW1wXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ZpbGVuYW1lID0gXCIvVXNlcnMvZ3V5cm9tbS9teXByb2plY3RzL3JlYWN0LWN1c3RvbS1zY3JvbGwtcmV2YW1wL3ZpdGUuY29uZmlnLnRzXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ltcG9ydF9tZXRhX3VybCA9IFwiZmlsZTovLy9Vc2Vycy9ndXlyb21tL215cHJvamVjdHMvcmVhY3QtY3VzdG9tLXNjcm9sbC1yZXZhbXAvdml0ZS5jb25maWcudHNcIjtpbXBvcnQgeyBkZWZpbmVDb25maWcgfSBmcm9tIFwidml0ZVwiO1xuaW1wb3J0IHJlYWN0IGZyb20gXCJAdml0ZWpzL3BsdWdpbi1yZWFjdC1zd2NcIjtcbmltcG9ydCBwYXRoIGZyb20gXCJwYXRoXCI7XG5pbXBvcnQgZHRzIGZyb20gXCJ2aXRlLXBsdWdpbi1kdHNcIjtcbl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