componenteshospitais 3.2.6 → 3.2.8

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
@@ -100,7 +100,7 @@ var CardImage = function (_a) {
100
100
  }
101
101
  };
102
102
  var content = (React.createElement(React.Fragment, null,
103
- React.createElement("img", { src: img, alt: img, className: styles$6.iconeOna, style: { width: larguraImage ? larguraImage : undefined, height: alturaImage ? alturaImage : undefined } }),
103
+ img && (React.createElement("img", { src: img, alt: img, className: styles$6.iconeOna, style: { width: larguraImage ? larguraImage : undefined, height: alturaImage ? alturaImage : undefined } })),
104
104
  texto && (React.createElement("span", { className: styles$6.cardText, dangerouslySetInnerHTML: { __html: texto } }))));
105
105
  return (React.createElement("div", { className: "".concat(empresaClass), style: { width: largura ? "".concat(largura) : '250px', height: altura ? "".concat(altura) : '300px', borderRadius: '1rem' } }, fileInput ? (React.createElement("label", { className: "".concat(styles$6.botaoCert), style: { position: 'relative', cursor: 'pointer', display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center', width: '100%', height: '100%' } },
106
106
  React.createElement("input", { type: "file", onChange: handleFileChange, style: {
package/dist/esm/index.js CHANGED
@@ -98,7 +98,7 @@ var CardImage = function (_a) {
98
98
  }
99
99
  };
100
100
  var content = (React.createElement(React.Fragment, null,
101
- React.createElement("img", { src: img, alt: img, className: styles$6.iconeOna, style: { width: larguraImage ? larguraImage : undefined, height: alturaImage ? alturaImage : undefined } }),
101
+ img && (React.createElement("img", { src: img, alt: img, className: styles$6.iconeOna, style: { width: larguraImage ? larguraImage : undefined, height: alturaImage ? alturaImage : undefined } })),
102
102
  texto && (React.createElement("span", { className: styles$6.cardText, dangerouslySetInnerHTML: { __html: texto } }))));
103
103
  return (React.createElement("div", { className: "".concat(empresaClass), style: { width: largura ? "".concat(largura) : '250px', height: altura ? "".concat(altura) : '300px', borderRadius: '1rem' } }, fileInput ? (React.createElement("label", { className: "".concat(styles$6.botaoCert), style: { position: 'relative', cursor: 'pointer', display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center', width: '100%', height: '100%' } },
104
104
  React.createElement("input", { type: "file", onChange: handleFileChange, style: {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  export interface CardImageProps {
3
- img: string;
3
+ img?: string;
4
4
  href?: string;
5
5
  texto?: string;
6
6
  empresa: '1' | '2' | '3' | '4' | '5';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "componenteshospitais",
3
- "version": "3.2.6",
3
+ "version": "3.2.8",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -2,7 +2,7 @@ import React, { useState } from 'react';
2
2
  import styles from '../styles/cardImage.module.css';
3
3
 
4
4
  export interface CardImageProps {
5
- img: string;
5
+ img?: string;
6
6
  href?: string;
7
7
  texto?: string;
8
8
  empresa: '1' | '2' | '3' | '4' | '5';
@@ -42,7 +42,9 @@ const CardImage: React.FC<CardImageProps> = ({ img, href, texto, empresa, largur
42
42
 
43
43
  const content = (
44
44
  <>
45
- <img src={img} alt={img} className={styles.iconeOna} style={{ width: larguraImage ? larguraImage : undefined, height: alturaImage ? alturaImage : undefined }} />
45
+ { img && (
46
+ <img src={img} alt={img} className={styles.iconeOna} style={{ width: larguraImage ? larguraImage : undefined, height: alturaImage ? alturaImage : undefined }} />
47
+ )}
46
48
  {texto && (
47
49
  <span className={styles.cardText} dangerouslySetInnerHTML={{ __html: texto }}></span>
48
50
  )}