Skip to content

Commit

Permalink
[docs] Fix git diff format (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Oct 3, 2024
1 parent 3de9308 commit 8ad6d53
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -660,13 +660,13 @@ By default, when `colorSchemes` is defined, Pigment CSS uses the [`prefers-colo
However, if you want to control the color scheme based on application logic, for example, using a button to switch between light and dark mode, you can customize the behavior by providing a `getSelector` function:

```diff
extendTheme({
colorSchemes: {
light: { ... },
dark: { ... },
},
+ getSelector: (colorScheme) => colorScheme ? `.theme-${colorScheme}` : ':root',
});
extendTheme({
colorSchemes: {
light: { ... },
dark: { ... },
},
+ getSelector: (colorScheme) => colorScheme ? `.theme-${colorScheme}` : ':root',
});
```

Note that you need to add the logic to a button by yourself. Here is an example of how to do it:
Expand Down

0 comments on commit 8ad6d53

Please sign in to comment.