-
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.
- Loading branch information
Showing
3 changed files
with
161 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,46 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import Button from './Button'; | ||
import styles from './CookieApprovalDialog.module.scss'; | ||
|
||
const CookieApprovalDialog = ({ className }) => { | ||
return ( | ||
<div className={`${styles.container} ${className || ''}`}> | ||
<div className={styles.content}> | ||
<div className={styles.primaryContent}> | ||
<h4 className={styles.heading}> | ||
This site uses cookies{' '} | ||
<span role="img" aria-label="Cookie emoji"> | ||
🍪 | ||
</span> | ||
</h4> | ||
<p className={styles.description}> | ||
We rely on cookies to play videos, remember your preferences, and | ||
analyze our website traffic. You consent to our cookies if you click | ||
“OK”. | ||
</p> | ||
</div> | ||
<div className={styles.ctaContainer}> | ||
<Button | ||
className={`button ${styles.approvalButton}`} | ||
variant={Button.VARIANT.PRIMARY} | ||
> | ||
OK | ||
</Button> | ||
<Button | ||
className={`${styles.ignoreButton}`} | ||
variant={Button.VARIANT.NORMAL} | ||
> | ||
Reject | ||
</Button> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
CookieApprovalDialog.propTypes = { | ||
className: PropTypes.string, | ||
}; | ||
|
||
export default CookieApprovalDialog; |
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,113 @@ | ||
.container { | ||
width: 100%; | ||
position: fixed; | ||
bottom: 0; | ||
z-index: 10000; | ||
background-color: rgba(28, 42, 47, 0.92); | ||
box-shadow: 0px -0.249053px 4.26158px rgba(12, 48, 57, 0.0421718), | ||
0px -0.598509px 10.2412px rgba(12, 48, 57, 0.0605839), | ||
0px -1.12694px 19.2832px rgba(12, 48, 57, 0.075), | ||
0px -2.01027px 34.3979px rgba(12, 48, 57, 0.0894161), | ||
0px -3.75998px 64.3375px rgba(12, 48, 57, 0.107828), | ||
0px -9px 154px rgba(12, 48, 57, 0.15); | ||
backdrop-filter: blur(5px); | ||
} | ||
|
||
.content { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
width: 1180px; | ||
margin: 0 auto; | ||
box-sizing: border-box; | ||
padding: 18px 0; | ||
} | ||
|
||
.heading { | ||
color: #fff; | ||
margin-top: 0; | ||
margin-bottom: 2px; | ||
line-height: 21px; | ||
} | ||
|
||
.description { | ||
margin: 0 0 0px; | ||
font-size: 13px; | ||
line-height: 21px; | ||
color: var(--color-neutrals-500); | ||
} | ||
|
||
.cta-container { | ||
margin-left: 16px; | ||
flex-shrink: 0; | ||
} | ||
|
||
.approval-button { | ||
margin-right: 10px; | ||
padding: 10px 30px; | ||
} | ||
|
||
.button-close { | ||
position: absolute; | ||
top: 4px; | ||
right: 4px; | ||
opacity: 0.75; | ||
} | ||
|
||
// ============================================================== | ||
// Responsive styles | ||
// ============================================================== | ||
@media screen and (max-width: 1200px) { | ||
.content { | ||
width: 100%; | ||
padding: 18px 28px; | ||
} | ||
|
||
.heading { | ||
margin-bottom: 6px; | ||
} | ||
|
||
.description { | ||
line-height: 19px; | ||
} | ||
} | ||
|
||
@media screen and (max-width: 480px) { | ||
.content { | ||
flex-direction: column; | ||
align-items: flex-start; | ||
} | ||
|
||
.description { | ||
margin-bottom: 16px; | ||
} | ||
|
||
.cta-container { | ||
margin: 0; | ||
} | ||
|
||
.approval-button { | ||
padding-top: 8px; | ||
padding-bottom: 8px; | ||
} | ||
|
||
.ignore-button { | ||
padding-top: 8px; | ||
padding-bottom: 8px; | ||
color: var(--color-neutrals-700); | ||
} | ||
} | ||
|
||
// ============================================================== | ||
// Dark mode | ||
// ============================================================== | ||
:global(.dark-mode) { | ||
.container { | ||
background-color: rgba(15, 25, 28, 0.92); | ||
box-shadow: 0 -1px 0 rgba(55, 72, 78, 0.4); | ||
} | ||
|
||
.description { | ||
color: var(--color-neutrals-600); | ||
} | ||
} |
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