sag_components 1.0.1 → 1.0.3
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/stories/Button.stories.js +6 -6
- package/dist/stories/components/Button.js +3 -3
- package/dist/stories/components/OneColumnContainer.js +4 -2
- package/package.json +1 -2
- package/src/stories/Button.stories.js +6 -6
- package/src/stories/components/Button.jsx +2 -2
- package/src/stories/components/OneColumnContainer.jsx +2 -0
- package/decs.d.ts +0 -0
- package/src/index.d.ts +0 -10
- package/tsconfig.json +0 -0
|
@@ -21,12 +21,12 @@ var _default = {
|
|
|
21
21
|
description: "text inside of the button",
|
|
22
22
|
defaultValue: ""
|
|
23
23
|
},
|
|
24
|
-
|
|
24
|
+
shape: {
|
|
25
25
|
control: {
|
|
26
26
|
type: "radio"
|
|
27
27
|
},
|
|
28
28
|
options: ["contained", "outlined", "text"],
|
|
29
|
-
description: "
|
|
29
|
+
description: "shape of the button"
|
|
30
30
|
},
|
|
31
31
|
size: {
|
|
32
32
|
control: {
|
|
@@ -57,7 +57,7 @@ var SmallContainedStyle = Template.bind({});
|
|
|
57
57
|
exports.SmallContainedStyle = SmallContainedStyle;
|
|
58
58
|
SmallContainedStyle.args = {
|
|
59
59
|
text: "Confirm",
|
|
60
|
-
|
|
60
|
+
shape: "contained",
|
|
61
61
|
size: "small",
|
|
62
62
|
disabled: false
|
|
63
63
|
};
|
|
@@ -66,7 +66,7 @@ exports.DisabledContainedStyle = DisabledContainedStyle;
|
|
|
66
66
|
DisabledContainedStyle.args = {
|
|
67
67
|
size: "small",
|
|
68
68
|
text: "Confirm",
|
|
69
|
-
|
|
69
|
+
shape: "contained",
|
|
70
70
|
disabled: true
|
|
71
71
|
};
|
|
72
72
|
var MediumOutlinedStyle = Template.bind({});
|
|
@@ -74,7 +74,7 @@ exports.MediumOutlinedStyle = MediumOutlinedStyle;
|
|
|
74
74
|
MediumOutlinedStyle.args = {
|
|
75
75
|
text: "Confirm",
|
|
76
76
|
size: "medium",
|
|
77
|
-
|
|
77
|
+
shape: "outlined",
|
|
78
78
|
disabled: false
|
|
79
79
|
};
|
|
80
80
|
var LargeTextStyle = Template.bind({});
|
|
@@ -82,6 +82,6 @@ exports.LargeTextStyle = LargeTextStyle;
|
|
|
82
82
|
LargeTextStyle.args = {
|
|
83
83
|
text: "Confirm",
|
|
84
84
|
size: "large",
|
|
85
|
-
|
|
85
|
+
shape: "text",
|
|
86
86
|
disabled: false
|
|
87
87
|
};
|
|
@@ -10,10 +10,10 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
12
12
|
var _Stack = _interopRequireDefault(require("@mui/material/Stack"));
|
|
13
|
-
var _excluded = ["text", "
|
|
13
|
+
var _excluded = ["text", "shape", "size", "disabled", "onClick"];
|
|
14
14
|
var Button = function Button(_ref) {
|
|
15
15
|
var text = _ref.text,
|
|
16
|
-
|
|
16
|
+
shape = _ref.shape,
|
|
17
17
|
size = _ref.size,
|
|
18
18
|
disabled = _ref.disabled,
|
|
19
19
|
_onClick = _ref.onClick,
|
|
@@ -25,7 +25,7 @@ var Button = function Button(_ref) {
|
|
|
25
25
|
sx: {
|
|
26
26
|
textTransform: 'none'
|
|
27
27
|
},
|
|
28
|
-
variant:
|
|
28
|
+
variant: shape,
|
|
29
29
|
size: size,
|
|
30
30
|
disabled: disabled ? true : false,
|
|
31
31
|
onClick: function onClick(event) {
|
|
@@ -5,7 +5,7 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.OneColumnContainer = void 0;
|
|
8
|
+
exports.default = exports.OneColumnContainer = void 0;
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -41,4 +41,6 @@ var OneColumnContainer = function OneColumnContainer(_ref) {
|
|
|
41
41
|
})));
|
|
42
42
|
};
|
|
43
43
|
exports.OneColumnContainer = OneColumnContainer;
|
|
44
|
-
OneColumnContainer.defaultProps = {};
|
|
44
|
+
OneColumnContainer.defaultProps = {};
|
|
45
|
+
var _default = OneColumnContainer;
|
|
46
|
+
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sag_components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
6
|
"scripts": {
|
|
8
7
|
"start": "react-scripts start",
|
|
9
8
|
"build": "cross-env BABEL_ENV=production babel src -d dist",
|
|
@@ -15,10 +15,10 @@ export default {
|
|
|
15
15
|
defaultValue: "",
|
|
16
16
|
},
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
shape: {
|
|
19
19
|
control: { type: "radio" },
|
|
20
20
|
options: ["contained", "outlined", "text"],
|
|
21
|
-
description: "
|
|
21
|
+
description: "shape of the button",
|
|
22
22
|
},
|
|
23
23
|
|
|
24
24
|
size: {
|
|
@@ -46,7 +46,7 @@ const Template = (args) => <Button {...args} />;
|
|
|
46
46
|
export const SmallContainedStyle = Template.bind({});
|
|
47
47
|
SmallContainedStyle.args = {
|
|
48
48
|
text: "Confirm",
|
|
49
|
-
|
|
49
|
+
shape: "contained",
|
|
50
50
|
size: "small",
|
|
51
51
|
disabled: false,
|
|
52
52
|
};
|
|
@@ -56,7 +56,7 @@ export const DisabledContainedStyle = Template.bind({});
|
|
|
56
56
|
DisabledContainedStyle.args = {
|
|
57
57
|
size: "small",
|
|
58
58
|
text: "Confirm",
|
|
59
|
-
|
|
59
|
+
shape: "contained",
|
|
60
60
|
disabled: true,
|
|
61
61
|
};
|
|
62
62
|
|
|
@@ -64,7 +64,7 @@ export const MediumOutlinedStyle = Template.bind({});
|
|
|
64
64
|
MediumOutlinedStyle.args = {
|
|
65
65
|
text: "Confirm",
|
|
66
66
|
size: "medium",
|
|
67
|
-
|
|
67
|
+
shape: "outlined",
|
|
68
68
|
disabled: false,
|
|
69
69
|
};
|
|
70
70
|
|
|
@@ -73,7 +73,7 @@ export const LargeTextStyle = Template.bind({});
|
|
|
73
73
|
LargeTextStyle.args = {
|
|
74
74
|
text: "Confirm",
|
|
75
75
|
size: "large",
|
|
76
|
-
|
|
76
|
+
shape: "text",
|
|
77
77
|
disabled: false,
|
|
78
78
|
};
|
|
79
79
|
|
|
@@ -2,13 +2,13 @@ import * as React from "react";
|
|
|
2
2
|
import MUIButton from "@mui/material/Button";
|
|
3
3
|
import Stack from "@mui/material/Stack";
|
|
4
4
|
|
|
5
|
-
export const Button = ({text,
|
|
5
|
+
export const Button = ({text, shape, size, disabled, onClick, ...props}) => {
|
|
6
6
|
|
|
7
7
|
return (
|
|
8
8
|
<Stack direction="row" spacing={2}>
|
|
9
9
|
<MUIButton
|
|
10
10
|
sx={{ textTransform: 'none'}}
|
|
11
|
-
variant={
|
|
11
|
+
variant={shape}
|
|
12
12
|
size={size}
|
|
13
13
|
disabled={disabled ? true : false}
|
|
14
14
|
onClick={(event) => {
|
package/decs.d.ts
DELETED
|
File without changes
|
package/src/index.d.ts
DELETED
package/tsconfig.json
DELETED
|
File without changes
|