Created
February 16, 2023 01:07
-
-
Save rafunderscore/700a04dec099c27020856593a7f27518 to your computer and use it in GitHub Desktop.
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
import type { ComponentType } from "react" | |
import styled from "@emotion/styled" | |
const GradientBlur = styled.div` | |
user-select: none; | |
pointer-events: none; | |
position: fixed; | |
top: 0px; | |
left: 0px; | |
width: 100%; | |
height: min(96px,128px); | |
z-index: 10; | |
opacity: 0.95; | |
backdrop-filter: blur(5px); | |
-webkit-mask-image: linear-gradient(to bottom,#000 25%,transparent); | |
` | |
export function withBlur(Component): ComponentType { | |
return (props) => { | |
return <GradientBlur /> | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment