Created
February 16, 2023 06:12
-
-
Save ra-kesh/ee6a2ce1e8eb710e693c25c33019977e to your computer and use it in GitHub Desktop.
This file contains hidden or 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