New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

material-modal-dark

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

material-modal-dark

A modal component for React with Material-UI, that comes in dark mode.

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-40%
Maintainers
1
Weekly downloads
 
Created
Source

Material Modal Dark

Installation

  • Run npm install material-modal-dark in your project.
  • Import in your project using import Modal from 'material-modal-dark';

Usage

<Modal {...props} />

Props

  • dark (optional | boolean | default:false) - enables the dark mode of the modal
  • open (required | boolean | default:false) - state if the modal should be open or not
  • handleClose (required | function | default:null) - fires when the component should close
  • children (required | JSX.Element | default:'') - the content of the modal

Sample Usage

import React from 'react';
import Modal from 'material-modal-dark;


const Component = () => {
	const [open, setOpen] = React.useState(false);
	const handleOpen = () => setOpen(true);
	const handleClose = () => setOpen(false);
	return (
		<React.Fragment>
			<button onClick={handleOpen}> Open Modal </button>
			<Modal handleClose={handleClose} open={open} dark={true}>
				<h1> Hi I am a modal </h1>
			</Modal>
		</React.Fragment>
	);
}


export default Component;

Demo

Web view:

Demo web view

Mobile view:

Demo mobile view

Keywords

FAQs

Package last updated on 16 Nov 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc