componenteshospitais 3.0.0 → 3.0.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.
@@ -11,6 +11,8 @@ interface FilterableInputProps {
11
11
  showIcon?: boolean;
12
12
  corFundo?: string;
13
13
  corLabel?: string;
14
+ borderRadius?: string;
15
+ border?: string;
14
16
  }
15
17
  declare const Busca: React.FC<FilterableInputProps>;
16
18
  export default Busca;
@@ -6,6 +6,7 @@ interface ButtonProps {
6
6
  texto: string;
7
7
  largura?: string;
8
8
  borderRadius?: number;
9
+ disabled?: boolean;
9
10
  }
10
11
  declare const Button: React.FC<ButtonProps>;
11
12
  export default Button;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "componenteshospitais",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -15,9 +15,11 @@ interface FilterableInputProps {
15
15
  showIcon?: boolean;
16
16
  corFundo?: string;
17
17
  corLabel?: string;
18
+ borderRadius?: string;
19
+ border?: string;
18
20
  }
19
21
 
20
- const Busca: React.FC<FilterableInputProps> = ({ options, value, onChange, label, showIcon = false, corLabel, corFundo }) => {
22
+ const Busca: React.FC<FilterableInputProps> = ({ options, value, onChange, label, showIcon = false, corLabel, corFundo, borderRadius, border }) => {
21
23
  const [filteredOptions, setFilteredOptions] = useState<OptionType[]>(options);
22
24
  const [showOptions, setShowOptions] = useState<boolean>(false);
23
25
  const [inputValue, setInputValue] = useState<string>('');
@@ -79,7 +81,13 @@ const Busca: React.FC<FilterableInputProps> = ({ options, value, onChange, label
79
81
  placeholder="Digite para buscar..."
80
82
  autoComplete="off"
81
83
  className={styles.inputPadrao}
82
- style={{ width: '100%', paddingLeft: showIcon ? '30px' : '0', backgroundColor: (corFundo ? corFundo : '')}}
84
+ style={{
85
+ width: '100%',
86
+ paddingLeft: showIcon ? '30px' : '0',
87
+ backgroundColor: (corFundo ? corFundo : ''),
88
+ borderRadius: (borderRadius ? `${borderRadius}px` : ''),
89
+ border: (border ? border : '')
90
+ }}
83
91
  />
84
92
  </div>
85
93
  {showOptions && filteredOptions.length > 0 && (
@@ -8,17 +8,18 @@ interface ButtonProps {
8
8
  texto: string;
9
9
  largura?: string;
10
10
  borderRadius?: number;
11
+ disabled?: boolean;
11
12
  }
12
13
 
13
- const Button: React.FC<ButtonProps> = ({ empresa, type = 'submit', onClick, texto, largura, borderRadius }) => {
14
+ const Button: React.FC<ButtonProps> = ({ empresa, type = 'submit', onClick, texto, largura, borderRadius, disabled }) => {
14
15
  const empresaClass = styles[`empresa${empresa}`];
15
16
 
16
17
  return (
17
18
  <div className={`${empresaClass}`}>
18
19
  {type === 'submit' ? (
19
- <input type="submit" className={styles.inputSubmit} style={{width: largura ? `${largura}` : '', borderRadius: borderRadius ? `${borderRadius}px` : '' }} value={texto}/>
20
+ <input type="submit" className={styles.inputSubmit} style={{width: largura ? `${largura}` : '', borderRadius: borderRadius ? `${borderRadius}px` : '' }} value={texto} disabled={disabled}/>
20
21
  ) : (
21
- <button type="button" className={styles.inputSubmit} onClick={onClick} style={{width: largura ? `${largura}` : '', borderRadius: borderRadius ? `${borderRadius}px` : '' }} dangerouslySetInnerHTML={{ __html: texto }}>
22
+ <button type="button" className={styles.inputSubmit} onClick={onClick} style={{width: largura ? `${largura}` : '', borderRadius: borderRadius ? `${borderRadius}px` : '' }} dangerouslySetInnerHTML={{ __html: texto }} disabled={disabled}>
22
23
  </button>
23
24
  )}
24
25
  </div>