-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
84 additions
and
43 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
18 changes: 18 additions & 0 deletions
18
examples/react-app/src/test/psuedo-selectors/PsudeoSelectors.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,18 @@ | ||
import styles from "./PsuedoSelectors.module.css"; | ||
|
||
function classNames(...args: any[]): string | undefined { | ||
throw new Error("Function not implemented."); | ||
} | ||
|
||
export const Foo = ({ isActive }: { isActive: boolean }) => { | ||
return ( | ||
<div | ||
className={classNames({ | ||
[styles.primary]: true, | ||
[styles.active]: isActive, | ||
}, styles.secondary, styles.where, styles.hello)} | ||
> | ||
foo | ||
</div> | ||
); | ||
}; |
29 changes: 29 additions & 0 deletions
29
examples/react-app/src/test/psuedo-selectors/PsuedoSelectors.module.css
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,29 @@ | ||
.not { | ||
&:not(.active) { | ||
opacity: 0.5; | ||
} | ||
} | ||
|
||
|
||
.is { | ||
&:is(.primary, .secondary) { | ||
font-size: 2rem; | ||
color: darkblue; | ||
} | ||
} | ||
|
||
.has { | ||
&:has(.inactive) { | ||
color: darkblue; | ||
} | ||
} | ||
|
||
.where { | ||
&:where(.hello) { | ||
text-align: center; | ||
} | ||
|
||
:hover { | ||
text-emphasis: none; | ||
} | ||
} |
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