beem-component 1.8.1 → 1.8.2
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/dist/components/Jumbotron/Jumbotron.js +24 -0
- package/dist/components/Jumbotron/Jumbotron.stories.js +32 -0
- package/dist/components/index.js +7 -0
- package/package.json +1 -1
- package/src/App.js +13 -1
- package/src/lib/components/Jumbotron/Jumbotron.js +54 -0
- package/src/lib/components/Jumbotron/Jumbotron.stories.js +31 -0
- package/src/lib/components/index.js +2 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _colors = require("../colors");
|
|
9
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
12
|
+
var Title = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n padding: 1rem 0.5rem;\n background: ", ";\n"])), function (props) {
|
|
13
|
+
return props.bgColor ? props.bgColor : _colors.BmPrimaryBlue;
|
|
14
|
+
});
|
|
15
|
+
var Body = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n padding: 0.5rem;\n > * {\n display: flex;\n flex-direction: column;\n flex-wrap: wrap;\n overflow-wrap: break-word !important;\n word-wrap: break-word !important;\n flex-grow: grow;\n > *:not(:last-child) {\n margin-bottom: 0.5rem;\n }\n }\n @media all and (max-width: 960px) {\n flex-direction: column;\n }\n"])));
|
|
16
|
+
var BmJumbotron = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n border: 0.071rem solid ", ";\n border-radius: 0.25rem;\n"])), _colors.BmGrey200);
|
|
17
|
+
var text = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n"])));
|
|
18
|
+
var image = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n width: 20%;\n @media all and (max-width: 960px) {\n width: 100%;\n }\n"])));
|
|
19
|
+
BmJumbotron.Title = Title;
|
|
20
|
+
BmJumbotron.Body = Body;
|
|
21
|
+
BmJumbotron.Body.Text = text;
|
|
22
|
+
BmJumbotron.Body.Image = image;
|
|
23
|
+
var _default = BmJumbotron;
|
|
24
|
+
exports.default = _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.BasicJumbotronSample = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _addonKnobs = require("@storybook/addon-knobs");
|
|
9
|
+
var _Jumbotron = _interopRequireDefault(require("./Jumbotron"));
|
|
10
|
+
var _beem = _interopRequireDefault(require("../../assets/beem.jpeg"));
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
/* eslint-disable import/no-anonymous-default-export */
|
|
13
|
+
var _default = {
|
|
14
|
+
component: _Jumbotron.default,
|
|
15
|
+
title: 'components/Jumbotron',
|
|
16
|
+
argTypes: {
|
|
17
|
+
children: {
|
|
18
|
+
description: 'Accordion Title Text',
|
|
19
|
+
defaultValue: {
|
|
20
|
+
summary: undefined
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.default = _default;
|
|
26
|
+
var BasicJumbotronSample = function BasicJumbotronSample() {
|
|
27
|
+
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Jumbotron.default, null, /*#__PURE__*/_react.default.createElement(_Jumbotron.default.Title, null, /*#__PURE__*/_react.default.createElement("h3", null, (0, _addonKnobs.text)('children', 'Title'))), /*#__PURE__*/_react.default.createElement(_Jumbotron.default.Body.Text, null, "Body Text"), /*#__PURE__*/_react.default.createElement(_Jumbotron.default.Body.Image, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
28
|
+
src: _beem.default,
|
|
29
|
+
alt: "sampleImage"
|
|
30
|
+
}))));
|
|
31
|
+
};
|
|
32
|
+
exports.BasicJumbotronSample = BasicJumbotronSample;
|
package/dist/components/index.js
CHANGED
|
@@ -179,6 +179,12 @@ Object.defineProperty(exports, "BmInput", {
|
|
|
179
179
|
return _input.BmInput;
|
|
180
180
|
}
|
|
181
181
|
});
|
|
182
|
+
Object.defineProperty(exports, "BmJumbotron", {
|
|
183
|
+
enumerable: true,
|
|
184
|
+
get: function get() {
|
|
185
|
+
return _Jumbotron.default;
|
|
186
|
+
}
|
|
187
|
+
});
|
|
182
188
|
Object.defineProperty(exports, "BmListBox", {
|
|
183
189
|
enumerable: true,
|
|
184
190
|
get: function get() {
|
|
@@ -361,6 +367,7 @@ var _progressRing = _interopRequireDefault(require("./ProgressRing/progressRing"
|
|
|
361
367
|
var _ProfileIcon = require("./ProfileIcon/ProfileIcon");
|
|
362
368
|
var _checkboxToggler = require("./Checkbox/checkboxToggler");
|
|
363
369
|
var _paymentBox = _interopRequireDefault(require("./PaymentBox/paymentBox"));
|
|
370
|
+
var _Jumbotron = _interopRequireDefault(require("./Jumbotron/Jumbotron"));
|
|
364
371
|
var _iconStyles = require("./iconStyles");
|
|
365
372
|
var _noteBar = require("./NoteBar/noteBar");
|
|
366
373
|
var _MainWrapper = require("./MainWrapper");
|
package/package.json
CHANGED
package/src/App.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import Image from './lib/assets/beem.jpeg';
|
|
3
3
|
import {
|
|
4
4
|
BmInput,
|
|
5
5
|
GlobalStyle,
|
|
6
6
|
|
|
7
7
|
// BmCheckboxToggle,
|
|
8
8
|
} from './lib/components';
|
|
9
|
+
import BmJumbotron from './lib/components/Jumbotron/Jumbotron';
|
|
9
10
|
|
|
10
11
|
// const Chat = () => {
|
|
11
12
|
// // const [test, setTest] = useState(false);
|
|
@@ -254,6 +255,17 @@ const Chat = () => {
|
|
|
254
255
|
<>
|
|
255
256
|
<GlobalStyle />
|
|
256
257
|
<BmInput placeholder="tejal" state="positive" action="incomplete" />
|
|
258
|
+
<BmJumbotron>
|
|
259
|
+
<BmJumbotron.Title>
|
|
260
|
+
<h3>Title</h3>
|
|
261
|
+
</BmJumbotron.Title>
|
|
262
|
+
<BmJumbotron.Body>
|
|
263
|
+
<BmJumbotron.Body.Text>Body Text</BmJumbotron.Body.Text>
|
|
264
|
+
<BmJumbotron.Body.Image>
|
|
265
|
+
<img src={Image} alt="sampleImage" />
|
|
266
|
+
</BmJumbotron.Body.Image>
|
|
267
|
+
</BmJumbotron.Body>
|
|
268
|
+
</BmJumbotron>
|
|
257
269
|
</>
|
|
258
270
|
);
|
|
259
271
|
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/* eslint-disable import/prefer-default-export */
|
|
2
|
+
/* eslint-disable react/jsx-props-no-spreading */
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { BmPrimaryBlue, BmGrey200 } from '../colors';
|
|
5
|
+
|
|
6
|
+
const Title = styled.div`
|
|
7
|
+
display: flex;
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
padding: 1rem 0.5rem;
|
|
10
|
+
background: ${(props) => (props.bgColor ? props.bgColor : BmPrimaryBlue)};
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
const Body = styled.div`
|
|
14
|
+
display: flex;
|
|
15
|
+
padding: 0.5rem;
|
|
16
|
+
> * {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
flex-wrap: wrap;
|
|
20
|
+
overflow-wrap: break-word !important;
|
|
21
|
+
word-wrap: break-word !important;
|
|
22
|
+
flex-grow: grow;
|
|
23
|
+
> *:not(:last-child) {
|
|
24
|
+
margin-bottom: 0.5rem;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
@media all and (max-width: 960px) {
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
|
|
32
|
+
const BmJumbotron = styled.div`
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
border: 0.071rem solid ${BmGrey200};
|
|
36
|
+
border-radius: 0.25rem;
|
|
37
|
+
`;
|
|
38
|
+
|
|
39
|
+
const text = styled.div`
|
|
40
|
+
width: 100%;
|
|
41
|
+
`;
|
|
42
|
+
const image = styled.div`
|
|
43
|
+
width: 20%;
|
|
44
|
+
@media all and (max-width: 960px) {
|
|
45
|
+
width: 100%;
|
|
46
|
+
}
|
|
47
|
+
`;
|
|
48
|
+
|
|
49
|
+
BmJumbotron.Title = Title;
|
|
50
|
+
BmJumbotron.Body = Body;
|
|
51
|
+
BmJumbotron.Body.Text = text;
|
|
52
|
+
BmJumbotron.Body.Image = image;
|
|
53
|
+
|
|
54
|
+
export default BmJumbotron;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* eslint-disable import/no-anonymous-default-export */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { text } from '@storybook/addon-knobs';
|
|
4
|
+
import BmJumbotron from './Jumbotron';
|
|
5
|
+
import Image from '../../assets/beem.jpeg';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
component: BmJumbotron,
|
|
9
|
+
title: 'components/Jumbotron',
|
|
10
|
+
argTypes: {
|
|
11
|
+
children: {
|
|
12
|
+
description: 'Accordion Title Text',
|
|
13
|
+
defaultValue: { summary: undefined },
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
export const BasicJumbotronSample = () => {
|
|
18
|
+
return (
|
|
19
|
+
<div>
|
|
20
|
+
<BmJumbotron>
|
|
21
|
+
<BmJumbotron.Title>
|
|
22
|
+
<h3>{text('children', 'Title')}</h3>
|
|
23
|
+
</BmJumbotron.Title>
|
|
24
|
+
<BmJumbotron.Body.Text>Body Text</BmJumbotron.Body.Text>
|
|
25
|
+
<BmJumbotron.Body.Image>
|
|
26
|
+
<img src={Image} alt="sampleImage" />
|
|
27
|
+
</BmJumbotron.Body.Image>
|
|
28
|
+
</BmJumbotron>
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
};
|
|
@@ -23,6 +23,7 @@ import BmProgressRing from './ProgressRing/progressRing';
|
|
|
23
23
|
import { BmProfileIcon } from './ProfileIcon/ProfileIcon';
|
|
24
24
|
import { BmCheckboxToggle } from './Checkbox/checkboxToggler';
|
|
25
25
|
import BmPaymentBox from './PaymentBox/paymentBox';
|
|
26
|
+
import BmJumbotron from './Jumbotron/Jumbotron';
|
|
26
27
|
import {
|
|
27
28
|
BmTagIcon,
|
|
28
29
|
BmAvatarIcon,
|
|
@@ -82,6 +83,7 @@ export {
|
|
|
82
83
|
BmProfileIcon,
|
|
83
84
|
BmCheckboxToggle,
|
|
84
85
|
BmPaymentBox,
|
|
86
|
+
BmJumbotron,
|
|
85
87
|
// Fix height and if there is dropdown option inside the modal body
|
|
86
88
|
BmModal,
|
|
87
89
|
BmNoteBar,
|