🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@acrool/react-dialog

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@acrool/react-dialog

Dialog library based for Reactjs

latest
Source
npmnpm
Version
1.1.4
Version published
Maintainers
1
Created
Source

Acrool React Dialog

Acrool React Dialog Logo

This is a dialog message function for React development dialog

NPM npm npm

npm downloads npm

^1.1.0 support react >=18.0.0 <20.0.0

Features

  • Supports 5 status colors: default, success, info, warning, danger
  • Call via global method
  • Plug and unplug using @acrool/react-portal and framer-motion

Install

yarn add framer-motion @acrool/react-dialog

Usage

add in your index.tsx

import "@acrool/react-dialog/dist/index.css";

add in your App.tsx

import {DialogPortal} from "@acrool/react-dialog";

const App = () => {
    return (
        <div>
            <BaseUsed/>

            <DialogPortal
                localeDictionaries={{
                    'en-US': {
                        'com.dialog.success': 'Success',
                        'com.dialog.error': 'Danger',
                        'com.dialog.info': 'Info',
                        'com.dialog.warning': 'Warning',
                        'com.dialog.confirm': 'Confirm',
                        'com.dialog.ok': 'OK',
                        'com.dialog.cancel': 'Cancel',
                    }
                }}
                locale="en-US"
                isVisibleStatusIcon
                renderButton={args => createElement(Button, args, args.children)}
                renderTextField={args => createElement(TextField, args, null)}
            />
            
        </div>
    );
};

then in your page

import {EStatus, toast} from '@acrool/react-dialog';

const Example = () => {
    return (
        <div>
            <button type="button" onClick={() => dialog({message: 'step1 test dialog', code: 'TEST1'})}>
                useDialog message
            </button>
        </div>
    );
};
  • dialog
  • dialog.success
  • dialog.info
  • dialog.warning
  • dialog.error
  • dialog.confirm

There is also a example that you can play with it:

Play react-editext-example

License

MIT Š Acrool & Imagine

Keywords

acrool

FAQs

Package last updated on 25 May 2025

Did you know?

Socket

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.

Install

Related posts