
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
@zendeskgarden/react-modals
Advanced tools
This package includes components relating to modals in the Garden Design System.
npm install @zendeskgarden/react-modals
# Peer Dependencies - Also Required
npm install react react-dom styled-components @zendeskgarden/react-theming
import { ThemeProvider } from '@zendeskgarden/react-theming';
import { Modal } from '@zendeskgarden/react-modals';
import { Button } from '@zendeskgarden/react-buttons';
/**
* Place a `ThemeProvider` at the root of your React application
*/
<ThemeProvider>
<Modal onClose={() => alert('modal closing')}>
<Modal.Header>Example Header</Modal.Header>
<Modal.Body>Some content</Modal.Body>
<Modal.Footer>
<Modal.FooterItem>
<Button isBasic>Cancel</Button>
</Modal.FooterItem>
<Modal.FooterItem>
<Button isPrimary>Confirm</Button>
</Modal.FooterItem>
</Modal.Footer>
<Modal.Close aria-label="Close modal" />
</Modal>
</ThemeProvider>;
import { ThemeProvider } from '@zendeskgarden/react-theming';
import { Drawer } from '@zendeskgarden/react-modals';
import { Button } from '@zendeskgarden/react-buttons';
const [isOpen, setIsOpen] = useState(false)
<ThemeProvider>
<Button onClick={() => setIsOpen(true)}>
Open
</Button>
<Drawer isOpen={state.isOpen} onClose={() => setIsOpen(false)}>
<Drawer.Header>Example Title</Drawer.Header>
<Drawer.Body>Some content</Drawer.Body>
<Drawer.Footer>
<Drawer.FooterItem>
<Button>Click</Button>
</Drawer.FooterItem>
</Drawer.Footer>
<Drawer.Close aria-Label="Close" />
</Drawer>
</ThemeProvider>
import { ThemeProvider } from '@zendeskgarden/react-theming';
import { TooltipModal } from '@zendeskgarden/react-modals';
import { Button } from '@zendeskgarden/react-buttons';
const [isOpen, setIsOpen] = useState(false);
const buttonRef = useRef(null);
<ThemeProvider>
<Button ref={buttonRef} onClick={() => setIsOpen(!isOpen)}>
Open
</Button>
<TooltipModal
onClose={() => setIsOpen(false)}
referenceElement={isOpen && buttonRef.current ? buttonRef.current : undefined}
>
<TooltipModal.Title>Example Title</TooltipModal.Title>
<TooltipModal.Body>Some content</TooltipModal.Body>
<TooltipModal.Footer>
<TooltipModal.FooterItem>
<Button>Click</Button>
</TooltipModal.FooterItem>
</TooltipModal.Footer>
<TooltipModal.Close aria-label="Close" />
</TooltipModal>
</ThemeProvider>;
FAQs
Components relating to modals in the Garden Design System
The npm package @zendeskgarden/react-modals receives a total of 32,613 weekly downloads. As such, @zendeskgarden/react-modals popularity was classified as popular.
We found that @zendeskgarden/react-modals demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.