baseui 0.0.0-next-47bec88 → 0.0.0-next-913cc0e
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.
|
@@ -10,11 +10,22 @@ LICENSE file in the root directory of this source tree.
|
|
|
10
10
|
*/
|
|
11
11
|
import * as React from 'react';
|
|
12
12
|
import { Toast, TYPE } from '../toast/index.js';
|
|
13
|
+
import { mergeOverrides } from '../helpers/overrides.js';
|
|
13
14
|
export default class Notification extends React.Component {
|
|
14
15
|
render() {
|
|
16
|
+
const overrides = mergeOverrides({
|
|
17
|
+
Body: {
|
|
18
|
+
style: {
|
|
19
|
+
marginTop: 0,
|
|
20
|
+
marginBottom: 0
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}, this.props.overrides);
|
|
15
24
|
return /*#__PURE__*/React.createElement(Toast, _extends({
|
|
16
25
|
"data-baseweb": "notification"
|
|
17
|
-
}, this.props
|
|
26
|
+
}, this.props, {
|
|
27
|
+
overrides: overrides
|
|
28
|
+
}));
|
|
18
29
|
}
|
|
19
30
|
|
|
20
31
|
}
|
|
@@ -32,6 +32,7 @@ LICENSE file in the root directory of this source tree.
|
|
|
32
32
|
*/
|
|
33
33
|
import * as React from 'react';
|
|
34
34
|
import { Toast, TYPE } from '../toast/index.js';
|
|
35
|
+
import { mergeOverrides } from '../helpers/overrides.js';
|
|
35
36
|
|
|
36
37
|
var Notification = /*#__PURE__*/function (_React$Component) {
|
|
37
38
|
_inherits(Notification, _React$Component);
|
|
@@ -47,9 +48,19 @@ var Notification = /*#__PURE__*/function (_React$Component) {
|
|
|
47
48
|
_createClass(Notification, [{
|
|
48
49
|
key: "render",
|
|
49
50
|
value: function render() {
|
|
51
|
+
var overrides = mergeOverrides({
|
|
52
|
+
Body: {
|
|
53
|
+
style: {
|
|
54
|
+
marginTop: 0,
|
|
55
|
+
marginBottom: 0
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}, this.props.overrides);
|
|
50
59
|
return /*#__PURE__*/React.createElement(Toast, _extends({
|
|
51
60
|
"data-baseweb": "notification"
|
|
52
|
-
}, this.props
|
|
61
|
+
}, this.props, {
|
|
62
|
+
overrides: overrides
|
|
63
|
+
}));
|
|
53
64
|
}
|
|
54
65
|
}]);
|
|
55
66
|
|
|
@@ -11,6 +11,8 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _index = require("../toast/index.js");
|
|
13
13
|
|
|
14
|
+
var _overrides = require("../helpers/overrides.js");
|
|
15
|
+
|
|
14
16
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
15
17
|
|
|
16
18
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -53,9 +55,19 @@ var Notification = /*#__PURE__*/function (_React$Component) {
|
|
|
53
55
|
_createClass(Notification, [{
|
|
54
56
|
key: "render",
|
|
55
57
|
value: function render() {
|
|
58
|
+
var overrides = (0, _overrides.mergeOverrides)({
|
|
59
|
+
Body: {
|
|
60
|
+
style: {
|
|
61
|
+
marginTop: 0,
|
|
62
|
+
marginBottom: 0
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}, this.props.overrides);
|
|
56
66
|
return /*#__PURE__*/React.createElement(_index.Toast, _extends({
|
|
57
67
|
"data-baseweb": "notification"
|
|
58
|
-
}, this.props
|
|
68
|
+
}, this.props, {
|
|
69
|
+
overrides: overrides
|
|
70
|
+
}));
|
|
59
71
|
}
|
|
60
72
|
}]);
|
|
61
73
|
|
|
@@ -9,6 +9,7 @@ import * as React from 'react';
|
|
|
9
9
|
|
|
10
10
|
import { Toast, TYPE } from '../toast/index.js';
|
|
11
11
|
import type { ToastPropsT, ToastPropsShapeT } from '../toast/types.js';
|
|
12
|
+
import { mergeOverrides } from '../helpers/overrides.js';
|
|
12
13
|
|
|
13
14
|
export default class Notification extends React.Component<ToastPropsT> {
|
|
14
15
|
static defaultProps: ToastPropsShapeT = {
|
|
@@ -17,7 +18,11 @@ export default class Notification extends React.Component<ToastPropsT> {
|
|
|
17
18
|
};
|
|
18
19
|
|
|
19
20
|
render() {
|
|
20
|
-
|
|
21
|
+
const overrides = mergeOverrides(
|
|
22
|
+
{ Body: { style: { marginTop: 0, marginBottom: 0 } } },
|
|
23
|
+
this.props.overrides
|
|
24
|
+
);
|
|
25
|
+
return <Toast data-baseweb="notification" {...this.props} overrides={overrides} />;
|
|
21
26
|
}
|
|
22
27
|
}
|
|
23
28
|
|