Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@eisberg-labs/mui-next-cookie-consent
Advanced tools
React Material Ui cookie consent dialog, lightweight, compatible with nextjs cookies and tailwind css.
React Material Ui cookie consent dialog, compatible with Nextjs cookies.
Prerequisites are:
npm i --save @eisberg-labs/mui-next-cookie-consent
Just import the template with defaults:
<CookieConsent>This website uses cookies to enhance the user experience.</CookieConsent>
I use it in a nextjs app like this:
const CookieConsent = dynamic(() => import('@eisberg-labs/mui-next-cookie-consent'), {suspense: true});
export default function Layout({children}) {
return (
<>
<AppHeader/>
<div className={styles.wrapper}>{children}</div>
<Suspense><CookieConsent
cookieOptions={{
expires: moment().add(1, 'years').toDate()
}}
confirmText="I agree"
>This website uses cookies to enhance the user experience.</CookieConsent></Suspense>
<Footer/>
</>
);
}
You can change the default styling, cookie key, set expires, register callback on Accept.
Name | Type | Default | Description |
---|---|---|---|
defaultName | string | 'CookieConsent' | Cookie key name for cookie consent |
confirmText | React.ReactNode | 'I understand' | Confirm button text |
snackbarClassName | string | 'fixed p-3 z-50 bottom-0' | snackbar class name |
rootClassName | string | 'rounded-lg bg-white shadow-2xl p-3' | |
buttonClassName | string | 'bg-white hover:bg-gray-100 text-gray-800 font-semibold py-2 px-4 border border-gray-400 rounded shadow' | |
cookieOptions | CookieSerializeOptions | e.g. {expires: moment().add(1, 'days').toDate()} | |
onAccept | ()=>void | Optional function that triggers after cookie consent accepted. |
MIT © Eisberg Labs
FAQs
React Material Ui cookie consent dialog, lightweight, compatible with nextjs cookies and tailwind css.
The npm package @eisberg-labs/mui-next-cookie-consent receives a total of 0 weekly downloads. As such, @eisberg-labs/mui-next-cookie-consent popularity was classified as not popular.
We found that @eisberg-labs/mui-next-cookie-consent demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.