-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: issue with bad color-scheme changes (#1951)
- Loading branch information
Showing
9 changed files
with
93 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
@use "sass:string"; | ||
@use "sass:color"; | ||
@use "variables"; | ||
|
||
@each $variant in variables.$variants { | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
showcases/patternhub/pages/foundations/colors/color-schemes.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { useState } from 'react'; | ||
import DefaultPage from '../../../components/default-page'; | ||
import { DBButton, DBTag } from '../../../components/src'; | ||
|
||
const ColorOverview = () => { | ||
const [colorScheme, setColorScheme] = useState<string>('light'); | ||
return ( | ||
<DefaultPage> | ||
<h1>Color Schemes</h1> | ||
<div | ||
className="color-schemes-container" | ||
data-color-scheme={colorScheme}> | ||
<p>This container changes based on the state.</p> | ||
<DBTag variant="informational" emphasis="strong"> | ||
{colorScheme} | ||
</DBTag> | ||
<DBButton | ||
icon={colorScheme === 'light' ? 'night' : 'day'} | ||
onClick={() => { | ||
setColorScheme( | ||
colorScheme === 'light' ? 'dark' : 'light' | ||
); | ||
}}> | ||
Click me for {colorScheme === 'light' ? 'dark' : 'light'} | ||
-mode | ||
</DBButton> | ||
|
||
<section data-color-scheme="light"> | ||
<h2>Permanent Light</h2> | ||
<p>I'll be always light independent from parent</p> | ||
</section> | ||
<section data-color-scheme="dark"> | ||
<h2>Permanent Dark</h2> | ||
<p>I'll be always dark independent from parent</p> | ||
</section> | ||
</div> | ||
</DefaultPage> | ||
); | ||
}; | ||
|
||
export default ColorOverview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters