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.
- package/dist/cjs/index.js +10 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +10 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/types/components/Busca.d.ts +2 -0
- package/dist/types/components/Button.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/Busca.tsx +10 -2
- package/src/components/Button.tsx +4 -3
package/package.json
CHANGED
package/src/components/Busca.tsx
CHANGED
|
@@ -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={{
|
|
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>
|