componenteshospitais 2.0.6 → 2.0.7

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/cjs/index.js CHANGED
@@ -122,9 +122,9 @@ var styles$5 = {"inputSubmit":"input-module_inputSubmit__21-Pj","inputWrapper":"
122
122
  styleInject(css_248z$5);
123
123
 
124
124
  var Button = function (_a) {
125
- var empresa = _a.empresa, _b = _a.type, type = _b === void 0 ? 'submit' : _b, onClick = _a.onClick, texto = _a.texto, largura = _a.largura;
125
+ var empresa = _a.empresa, _b = _a.type, type = _b === void 0 ? 'submit' : _b, onClick = _a.onClick, texto = _a.texto, largura = _a.largura, borderRadius = _a.borderRadius;
126
126
  var empresaClass = styles$5["empresa".concat(empresa)];
127
- return (React$2.createElement("div", { className: "".concat(empresaClass) }, type === 'submit' ? (React$2.createElement("input", { type: "submit", className: styles$5.inputSubmit, style: { width: largura ? "".concat(largura) : '' }, value: texto })) : (React$2.createElement("button", { type: "button", className: styles$5.inputSubmit, onClick: onClick, style: { width: largura ? "".concat(largura) : '' } }, texto))));
127
+ return (React$2.createElement("div", { className: "".concat(empresaClass), style: { borderRadius: borderRadius ? "".concat(borderRadius, "px") : '' } }, type === 'submit' ? (React$2.createElement("input", { type: "submit", className: styles$5.inputSubmit, style: { width: largura ? "".concat(largura) : '', borderRadius: borderRadius ? "".concat(borderRadius, "px") : '' }, value: texto })) : (React$2.createElement("button", { type: "button", className: styles$5.inputSubmit, onClick: onClick, style: { width: largura ? "".concat(largura) : '', borderRadius: borderRadius ? "".concat(borderRadius, "px") : '' } }, texto))));
128
128
  };
129
129
 
130
130
  /******************************************************************************
package/dist/esm/index.js CHANGED
@@ -120,9 +120,9 @@ var styles$5 = {"inputSubmit":"input-module_inputSubmit__21-Pj","inputWrapper":"
120
120
  styleInject(css_248z$5);
121
121
 
122
122
  var Button = function (_a) {
123
- var empresa = _a.empresa, _b = _a.type, type = _b === void 0 ? 'submit' : _b, onClick = _a.onClick, texto = _a.texto, largura = _a.largura;
123
+ var empresa = _a.empresa, _b = _a.type, type = _b === void 0 ? 'submit' : _b, onClick = _a.onClick, texto = _a.texto, largura = _a.largura, borderRadius = _a.borderRadius;
124
124
  var empresaClass = styles$5["empresa".concat(empresa)];
125
- return (React$2.createElement("div", { className: "".concat(empresaClass) }, type === 'submit' ? (React$2.createElement("input", { type: "submit", className: styles$5.inputSubmit, style: { width: largura ? "".concat(largura) : '' }, value: texto })) : (React$2.createElement("button", { type: "button", className: styles$5.inputSubmit, onClick: onClick, style: { width: largura ? "".concat(largura) : '' } }, texto))));
125
+ return (React$2.createElement("div", { className: "".concat(empresaClass), style: { borderRadius: borderRadius ? "".concat(borderRadius, "px") : '' } }, type === 'submit' ? (React$2.createElement("input", { type: "submit", className: styles$5.inputSubmit, style: { width: largura ? "".concat(largura) : '', borderRadius: borderRadius ? "".concat(borderRadius, "px") : '' }, value: texto })) : (React$2.createElement("button", { type: "button", className: styles$5.inputSubmit, onClick: onClick, style: { width: largura ? "".concat(largura) : '', borderRadius: borderRadius ? "".concat(borderRadius, "px") : '' } }, texto))));
126
126
  };
127
127
 
128
128
  /******************************************************************************
@@ -5,6 +5,7 @@ interface ButtonProps {
5
5
  onClick?: () => void;
6
6
  texto: string;
7
7
  largura?: string;
8
+ borderRadius?: number;
8
9
  }
9
10
  declare const Button: React.FC<ButtonProps>;
10
11
  export default Button;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "componenteshospitais",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -7,17 +7,19 @@ interface ButtonProps {
7
7
  onClick?: () => void;
8
8
  texto: string;
9
9
  largura?: string;
10
+ borderRadius?: number;
10
11
  }
11
12
 
12
- const Button: React.FC<ButtonProps> = ({ empresa, type = 'submit', onClick, texto, largura }) => {
13
+ const Button: React.FC<ButtonProps> = ({ empresa, type = 'submit', onClick, texto, largura, borderRadius }) => {
13
14
  const empresaClass = styles[`empresa${empresa}`];
14
15
 
15
16
  return (
16
- <div className={`${empresaClass}`}>
17
+ <div className={`${empresaClass}`}
18
+ style={{ borderRadius: borderRadius ? `${borderRadius}px` : '' }}>
17
19
  {type === 'submit' ? (
18
- <input type="submit" className={styles.inputSubmit} style={{width: largura ? `${largura}` : ''}} value={texto}/>
20
+ <input type="submit" className={styles.inputSubmit} style={{width: largura ? `${largura}` : '', borderRadius: borderRadius ? `${borderRadius}px` : '' }} value={texto}/>
19
21
  ) : (
20
- <button type="button" className={styles.inputSubmit} onClick={onClick} style={{width: largura ? `${largura}` : ''}}>
22
+ <button type="button" className={styles.inputSubmit} onClick={onClick} style={{width: largura ? `${largura}` : '', borderRadius: borderRadius ? `${borderRadius}px` : '' }}>
21
23
  {texto}
22
24
  </button>
23
25
  )}