Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@eisberg-labs/mui-next-cookie-consent
Advanced tools
Readme
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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.