Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
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.
@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 { Docs } from '@rmwc/base/utils/document-component';
import * as docs from './docgen.json';
<Docs src={docs} components={[
'Dialog',
'DialogTitle',
'DialogContent',
'DialogActions',
'DialogButton',
'SimpleDialog'
]} />
FAQs
RMWC Dialog component
The npm package @rmwc/dialog receives a total of 861 weekly downloads. As such, @rmwc/dialog popularity was classified as not 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
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.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.