Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@gluestack-ui/alert-dialog
Advanced tools
A universal headless alert-dialog component for React Native, Next.js & React
@gluestack-ui/alert-dialog
AlertDialog effectively interrupts a user's flow and prompts them to take a specific action. It's commonly used for mandatory confirmations or call-to-actions.
To install the component, run the following command in your terminal. This will add the component to your project's dependencies and allow you to use it in your project.
npx gluestack-ui@latest add alert-dialog
Default styling of all these components can be found in the components/core/Default styling of all these components can be found in the components/core/alert-dialog file. For reference, you can view the source code of the styled AlertDialog components.
// import the styles
import {
Root,
Content,
CloseButton,
Header,
Footer,
Body,
Backdrop,
} from '../components/core/alert-dialog/styled-components';
// import the createAlertDialog function
import { createAlertDialog } from '@gluestack-ui/alert-dialog';
// Understanding the API
const AlertDialog = createAlertDialog({
Root,
Content,
CloseButton,
Header,
Footer,
Body,
Backdrop,
});
// Using the alert-dialog component
export default () => (
<AlertDialog>
<AlertDialog.Backdrop />
<AlertDialog.Content>
<AlertDialog.Header>
<Heading>Confirm your request</Heading>
<AlertDialog.CloseButton>
<CloseIcon />
</AlertDialog.CloseButton>
</AlertDialog.Header>
<AlertDialog.Body>
<Text>AlertDialog Body</Text>
</AlertDialog.Body>
<AlertDialog.Footer>
<Button>
<Button.Text></Button.Text>
</Button>
<Button>
<Button.Text></Button.Text>
</Button>
</AlertDialog.Footer>
</AlertDialog.Content>
</AlertDialog>
);
More guides on how to get started are available here.
FAQs
A universal headless alert-dialog component for React Native, Next.js & React
The npm package @gluestack-ui/alert-dialog receives a total of 10,939 weekly downloads. As such, @gluestack-ui/alert-dialog popularity was classified as popular.
We found that @gluestack-ui/alert-dialog demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 16 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.