@expressms/smartapp-ui 1.0.3 → 1.0.4
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/build/main/styles/stories.module.scss +12 -0
- package/build/main/styles/styles.min.css +1 -1
- package/build/main//321/201omponents/Button/types.d.ts +2 -2
- package/build/main//321/201omponents/Input/Input.d.ts +1 -1
- package/build/main//321/201omponents/Input/Input.js +4 -2
- package/build/main//321/201omponents/Input/types.d.ts +3 -1
- package/package.json +1 -1
|
@@ -11,8 +11,8 @@ export declare enum TButtonColor {
|
|
|
11
11
|
export interface IButtonProps {
|
|
12
12
|
title: string;
|
|
13
13
|
isDisabled?: boolean;
|
|
14
|
-
typeButton?:
|
|
15
|
-
color?:
|
|
14
|
+
typeButton?: 'standard' | 'low';
|
|
15
|
+
color?: 'white' | 'blue' | 'red';
|
|
16
16
|
onClickFunction?: () => void;
|
|
17
17
|
width?: IntRange<1, 101>;
|
|
18
18
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IInputProps } from './types';
|
|
2
2
|
import '../../styles/stories.module.scss';
|
|
3
|
-
declare const Input: ({
|
|
3
|
+
declare const Input: ({ onChange, title, placeholder, defaultValue, error, width, className }: IInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default Input;
|
|
@@ -10,9 +10,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import classNames from 'classnames';
|
|
13
14
|
import '../../styles/stories.module.scss';
|
|
14
15
|
var Input = function (_a) {
|
|
15
|
-
var
|
|
16
|
-
|
|
16
|
+
var _b;
|
|
17
|
+
var onChange = _a.onChange, title = _a.title, placeholder = _a.placeholder, defaultValue = _a.defaultValue, error = _a.error, _c = _a.width, width = _c === void 0 ? 100 : _c, _d = _a.className, className = _d === void 0 ? '' : _d;
|
|
18
|
+
return (_jsxs("div", __assign({ style: { width: "".concat(width, "%") }, className: classNames((_b = { 'smartapp-input': true }, _b[className] = className, _b)) }, { children: [title && _jsx("p", __assign({ className: "smartapp-input__title" }, { children: title })), _jsx("input", { className: "smartapp-input__field", defaultValue: defaultValue, placeholder: placeholder, onChange: function (e) { return onChange(e.target.value); } }), error && _jsx("div", __assign({ className: "smartapp-input__error" }, { children: error }))] })));
|
|
17
19
|
};
|
|
18
20
|
export default Input;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { IntRange } from '../types';
|
|
2
2
|
export interface IInputProps {
|
|
3
|
-
title?: string;
|
|
4
3
|
onChange: (str: string) => void;
|
|
4
|
+
title?: string;
|
|
5
5
|
placeholder?: string;
|
|
6
6
|
defaultValue?: string;
|
|
7
|
+
error?: string;
|
|
7
8
|
width?: IntRange<1, 101>;
|
|
9
|
+
className?: string;
|
|
8
10
|
}
|