Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@density/ui-modal

Package Overview
Dependencies
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@density/ui-modal - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

11

dist/index.js

@@ -6,2 +6,3 @@

exports.default = Modal;
exports.ModalClose = ModalClose;

@@ -31,1 +32,11 @@ var _react = require("react");

function ModalClose(_ref2) {
var onClick = _ref2.onClick;
return React.createElement(
"span",
{ className: "modal-close", onClick: onClick },
"\xD7"
);
}

31

dist/story.js

@@ -12,5 +12,5 @@ 'use strict';

var _ = require('./');
var _index = require('./index');
var _2 = _interopRequireDefault(_);
var _index2 = _interopRequireDefault(_index);

@@ -29,3 +29,3 @@ var _card = require('../card');

_react2.default.createElement(
_2.default,
_index2.default,
{ onClickBackdrop: (0, _addonActions.action)('backdrop click') },

@@ -48,3 +48,28 @@ _react2.default.createElement(

);
}).addWithInfo('With a close button', function () {
return _react2.default.createElement(
'div',
null,
'foo',
_react2.default.createElement(
_index2.default,
{ onClickBackdrop: (0, _addonActions.action)('backdrop click') },
_react2.default.createElement(
_card2.default,
null,
_react2.default.createElement(
_card.CardHeader,
null,
'Foo',
_react2.default.createElement(_index.ModalClose, { onClick: (0, _addonActions.action)('close button click') })
),
_react2.default.createElement(
_card.CardBody,
null,
'Bar'
)
)
)
);
});

@@ -8,1 +8,5 @@ import * as React from 'react';

}
export function ModalClose({onClick}) {
return <span className="modal-close" onClick={onClick}>&times;</span>;
}

2

package.json
{
"name": "@density/ui-modal",
"version": "0.0.4",
"version": "0.0.5",
"description": "Modal popup component",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -6,4 +6,4 @@ import React from 'react';

import './styles.scss';
import Modal from './';
import Modal, { ModalClose } from './index';
import Card, { CardHeader, CardBody } from '../card';

@@ -24,1 +24,15 @@

))
.addWithInfo('With a close button', () => (
<div>
foo
<Modal onClickBackdrop={action('backdrop click')}>
<Card>
<CardHeader>
Foo
<ModalClose onClick={action('close button click')} />
</CardHeader>
<CardBody>Bar</CardBody>
</Card>
</Modal>
</div>
))

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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