Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
cute-emojies-modal
Advanced tools
A fun and customizable modal package for React, letting you easily add emoji-based confirmation dialogs to your app!
A fun and customizable modal package for React, letting you easily add emoji-based confirmation dialogs to your app!
Check out the live demo of the modal in action.
You can install the package via yarn or npm:
yarn add cute-emojies-modal
or
npm install cute-emojies-modal
To use the styles provided by the package, import the CSS file in your index.ts (or index.js):
import 'cute-emojies-modal/dist/index.css';
To enable modals, ensure you add the CuteEmojiesConfirmContainer component to the app root. This is usually done in your main index.tsx file:
import { CuteEmojiesConfirmContainer } from 'cute-emojies-modal';
...
root.render(
<React.StrictMode>
<App />
<CuteEmojiesConfirmContainer /> // add this line
</React.StrictMode>
);
Now you can easily trigger modals in your components using the useCuteModal hook:
import { useCuteModal } from 'cute-emojies-modal';
function App() {
const modal = useCuteModal();
const onShowClick = async () => {
await modal({
title: 'Lovely',
body: 'Woho! Now you have 3 new badges!',
variant: 'yellow',
emoji: 2,
});
};
return (
<div>
<button onClick={onShowClick}>Show Modal</button>
</div>
);
}
export default App;
The variant property controls the color scheme of the modal. You can choose from the following options:
The emoji property allows you to choose which emoji to display in the modal. You can select a number between 1 and 10.
FAQs
A fun and customizable modal package for React, letting you easily add emoji-based confirmation dialogs to your app!
The npm package cute-emojies-modal receives a total of 0 weekly downloads. As such, cute-emojies-modal popularity was classified as not popular.
We found that cute-emojies-modal demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.