@micromag/element-header 0.3.354
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/css/styles.css +1 -0
- package/es/index.js +31 -0
- package/lib/index.js +41 -0
- package/package.json +60 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.micromag-element-header-container{-ms-flex-align:center;-ms-flex-pack:center;align-items:center;display:-ms-flexbox;display:flex;justify-content:center}
|
package/es/index.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import PropTypes$1 from 'prop-types';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { PropTypes } from '@micromag/core';
|
|
6
|
+
import Badge from '@micromag/element-badge';
|
|
7
|
+
|
|
8
|
+
var styles = {"container":"micromag-element-header-container"};
|
|
9
|
+
|
|
10
|
+
var propTypes = {
|
|
11
|
+
badge: PropTypes.badge,
|
|
12
|
+
className: PropTypes$1.string
|
|
13
|
+
};
|
|
14
|
+
var defaultProps = {
|
|
15
|
+
badge: null,
|
|
16
|
+
className: null
|
|
17
|
+
};
|
|
18
|
+
function Header(_ref) {
|
|
19
|
+
var badge = _ref.badge,
|
|
20
|
+
className = _ref.className;
|
|
21
|
+
if (badge === null) return null;
|
|
22
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
23
|
+
className: classNames([styles.container, _defineProperty({}, className, className !== null)])
|
|
24
|
+
}, badge !== null ? /*#__PURE__*/React.createElement(Badge, Object.assign({
|
|
25
|
+
className: styles.badge
|
|
26
|
+
}, badge)) : null);
|
|
27
|
+
}
|
|
28
|
+
Header.propTypes = propTypes;
|
|
29
|
+
Header.defaultProps = defaultProps;
|
|
30
|
+
|
|
31
|
+
export { Header as default };
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
+
var classNames = require('classnames');
|
|
5
|
+
var PropTypes = require('prop-types');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var core = require('@micromag/core');
|
|
8
|
+
var Badge = require('@micromag/element-badge');
|
|
9
|
+
|
|
10
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
+
|
|
12
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
13
|
+
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
14
|
+
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
15
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
|
+
var Badge__default = /*#__PURE__*/_interopDefaultLegacy(Badge);
|
|
17
|
+
|
|
18
|
+
var styles = {"container":"micromag-element-header-container"};
|
|
19
|
+
|
|
20
|
+
var propTypes = {
|
|
21
|
+
badge: core.PropTypes.badge,
|
|
22
|
+
className: PropTypes__default["default"].string
|
|
23
|
+
};
|
|
24
|
+
var defaultProps = {
|
|
25
|
+
badge: null,
|
|
26
|
+
className: null
|
|
27
|
+
};
|
|
28
|
+
function Header(_ref) {
|
|
29
|
+
var badge = _ref.badge,
|
|
30
|
+
className = _ref.className;
|
|
31
|
+
if (badge === null) return null;
|
|
32
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
33
|
+
className: classNames__default["default"]([styles.container, _defineProperty__default["default"]({}, className, className !== null)])
|
|
34
|
+
}, badge !== null ? /*#__PURE__*/React__default["default"].createElement(Badge__default["default"], Object.assign({
|
|
35
|
+
className: styles.badge
|
|
36
|
+
}, badge)) : null);
|
|
37
|
+
}
|
|
38
|
+
Header.propTypes = propTypes;
|
|
39
|
+
Header.defaultProps = defaultProps;
|
|
40
|
+
|
|
41
|
+
module.exports = Header;
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@micromag/element-header",
|
|
3
|
+
"version": "0.3.354",
|
|
4
|
+
"description": "",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"javascript"
|
|
7
|
+
],
|
|
8
|
+
"homepage": "https://github.com/urbania-media/micromag-js",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/urbania-media/micromag-js.git"
|
|
12
|
+
},
|
|
13
|
+
"author": {
|
|
14
|
+
"name": "Folklore",
|
|
15
|
+
"email": "info@folklore.email"
|
|
16
|
+
},
|
|
17
|
+
"contributors": [
|
|
18
|
+
{
|
|
19
|
+
"name": "David Mongeau-Petitpas",
|
|
20
|
+
"email": "dmp@folklore.email"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "Nicolas Roy-Bourdages",
|
|
24
|
+
"email": "nrb@folklore.email"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"license": "ISC",
|
|
28
|
+
"main": "lib/index.js",
|
|
29
|
+
"module": "es/index.js",
|
|
30
|
+
"files": [
|
|
31
|
+
"lib",
|
|
32
|
+
"es",
|
|
33
|
+
"assets"
|
|
34
|
+
],
|
|
35
|
+
"scripts": {
|
|
36
|
+
"prepare": "../../scripts/prepare-package.sh"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
40
|
+
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
44
|
+
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@babel/runtime": "^7.13.10",
|
|
48
|
+
"@micromag/core": "^0.3.354",
|
|
49
|
+
"@micromag/element-badge": "^0.3.354",
|
|
50
|
+
"classnames": "^2.2.6",
|
|
51
|
+
"lodash": "^4.17.21",
|
|
52
|
+
"prop-types": "^15.7.2",
|
|
53
|
+
"react-intl": "^5.12.1",
|
|
54
|
+
"uuid": "^9.0.0"
|
|
55
|
+
},
|
|
56
|
+
"publishConfig": {
|
|
57
|
+
"access": "public"
|
|
58
|
+
},
|
|
59
|
+
"gitHead": "ccf852d0a7df8f222365088e7de3843492e720e7"
|
|
60
|
+
}
|