Skip to content

Commit 0fd5d07

Browse files
committed
use exxisting CustomizingYourThemeColors component
1 parent 4ab57b7 commit 0fd5d07

1 file changed

Lines changed: 2 additions & 29 deletions

File tree

src/docs/scrollbar-color.mdx

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { ApiTable } from "@/components/api-table.tsx";
2-
import { CodeExample } from "@/components/code-example.tsx";
3-
import { ResponsiveDesign, TargetingSpecificStates } from "@/components/content.tsx";
2+
import { CustomizingYourThemeColors, ResponsiveDesign, TargetingSpecificStates } from "@/components/content.tsx";
43
import { Example } from "@/components/example.tsx";
54
import { Figure } from "@/components/figure.tsx";
65
import colors from "./utils/colors";
@@ -191,30 +190,4 @@ For CSS variables, you can also use the `scrollbar-thumb-(<custom-property>)` an
191190

192191
## Customizing your theme
193192

194-
Use the `--scrollbar-thumb-color-*` and `--scrollbar-track-color-*` theme variables to customize the scrollbar color
195-
utilities in your project:
196-
197-
<div>
198-
<div className="not-prose">
199-
<CodeExample
200-
example={{
201-
lang: "css",
202-
code: `@theme {
203-
--scrollbar-thumb-color-brand: #0f766e; /* [!code highlight] */
204-
--scrollbar-track-color-brand: #ccfbf1; /* [!code highlight] */
205-
}`,
206-
}}
207-
/>
208-
</div>
209-
</div>
210-
211-
Now utilities like `scrollbar-thumb-brand` and `scrollbar-track-brand` can be used in your markup:
212-
213-
```html
214-
<!-- [!code classes:scrollbar-thumb-brand,scrollbar-track-brand] -->
215-
<div class="scrollbar-thumb-brand scrollbar-track-brand ...">
216-
<!-- ... -->
217-
</div>
218-
```
219-
220-
These utilities also support your existing color palette using the `--color-*` theme variables.
193+
<CustomizingYourThemeColors utilities={["scrollbar-thumb", "scrollbar-track"]} />

0 commit comments

Comments
 (0)