-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Create a SkewedContainer component
- Loading branch information
1 parent
2265622
commit b2f37e6
Showing
2 changed files
with
25 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import cx from 'classnames'; | ||
import styles from './SkewedContainer.module.scss'; | ||
|
||
const SkewedContainer = ({ className, children }) => ( | ||
<div className={cx(styles.container, className)}> | ||
<div className={styles.content}>{children}</div> | ||
</div> | ||
); | ||
|
||
SkewedContainer.propTypes = { | ||
className: PropTypes.string, | ||
children: PropTypes.node, | ||
}; | ||
|
||
export default SkewedContainer; |
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,8 @@ | ||
.container { | ||
background: var(--color-neutrals-100); | ||
transform: skew(0, -2deg); | ||
} | ||
|
||
.content { | ||
transform: skew(0, 2deg); | ||
} |