Skip to content

Instantly share code, notes, and snippets.

@rafunderscore
Created February 16, 2023 01:07
Show Gist options
  • Save rafunderscore/700a04dec099c27020856593a7f27518 to your computer and use it in GitHub Desktop.
Save rafunderscore/700a04dec099c27020856593a7f27518 to your computer and use it in GitHub Desktop.
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