-
Notifications
You must be signed in to change notification settings - Fork 496
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix text color in Flex container (#1200)
- Loading branch information
1 parent
191d799
commit 28e75b3
Showing
3 changed files
with
20 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
import styles from "./flex.module.css"; | ||
import classNames from "classnames"; | ||
|
||
// Simple horizontal flex container used for MDX. | ||
const Flex = ({ children }) => { | ||
return <section className={styles.Container}>{children}</section>; | ||
const Flex = ({ wrap = false, children }) => { | ||
return ( | ||
<section | ||
className={classNames(styles.Container, wrap ? styles.wrapContainer : "")} | ||
> | ||
{children} | ||
</section> | ||
); | ||
}; | ||
|
||
export default Flex; |
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,3 +1,11 @@ | ||
.Container { | ||
@apply flex flex-col lg:flex-row; | ||
@apply flex flex-col lg:flex-row text-gray-90; | ||
} | ||
|
||
:global(.dark) .Container { | ||
@apply text-gray-40; | ||
} | ||
|
||
.wrapContainer { | ||
@apply flex-wrap flex-row; | ||
} |
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