Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@rmwc/dialog
Advanced tools
Dialogs inform users about a specific task and may contain critical information, require decisions, or involve multiple tasks.
Material Dialogs are a complex component. RMWC contains an additional non-standard SimpleDialog
component for ease of use that internally contains the default structure already built out. Illustrated below is both the strandard and simple dialog usage.
import {
Dialog,
DialogTitle,
DialogContent,
DialogActions,
DialogButton
} from '@rmwc/dialog';
import { Button } from '@rmwc/button';
{/** Standard dialog usage */}
<Dialog
open={this.state.standardDialogOpen}
onClose={evt => {
console.log(evt.detail.action)
this.setState({standardDialogOpen: false})
}}
>
<DialogTitle>Dialog Title</DialogTitle>
<DialogContent>This is a standard dialog.</DialogContent>
<DialogActions>
<DialogButton action="close">Cancel</DialogButton>
<DialogButton action="accept" isDefaultAction>Sweet!</DialogButton>
</DialogActions>
</Dialog>
<Button
raised
onClick={evt => this.setState({standardDialogOpen: true})}
>
Open standard Dialog
</Button>
import { SimpleDialog } from '@rmwc/dialog';
import { Button } from '@rmwc/button';
{/** Simple Dialog usage */}
<SimpleDialog
title="This is a simple dialog"
body="You can pass the body prop, or anything you want as children."
open={this.state.simpleDialogIsOpen}
onClose={evt => {
console.log(evt.detail.action)
this.setState({simpleDialogIsOpen: false})
}}
/>
<Button
raised
onClick={evt => this.setState({simpleDialogIsOpen: true})}
>
Open Simple Dialog
</Button>
import { DocumentComponent } from '@rmwc/base/utils/document-component';
import * as docs from './docgen.json';
import * as buttonDocs from '@rmwc/button/docgen.json';
<DocumentComponent docs={docs} displayName="Dialog" />
<DocumentComponent docs={docs} displayName="DialogTitle" />
<DocumentComponent docs={docs} displayName="DialogContent" />
<DocumentComponent docs={docs} displayName="DialogActions" />
<DocumentComponent docs={[docs, buttonDocs]} displayName="DialogButton" composes={['Button']} />
<DocumentComponent docs={docs} displayName="SimpleDialog" />
3.0.7 (2018-10-24)
FAQs
RMWC Dialog component
The npm package @rmwc/dialog receives a total of 5,140 weekly downloads. As such, @rmwc/dialog popularity was classified as popular.
We found that @rmwc/dialog 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.