Skip to content

Commit

Permalink
feat: Create a SkewedContainer component
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Jun 17, 2020
1 parent 2265622 commit b2f37e6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/components/SkewedContainer.js
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;
8 changes: 8 additions & 0 deletions src/components/SkewedContainer.module.scss
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);
}

0 comments on commit b2f37e6

Please sign in to comment.