2024-09-10 15:44:08 -05:00
|
|
|
import { Button } from 'primereact/button';
|
|
|
|
import useWindowWidth from '@/hooks/useWindowWidth';
|
|
|
|
|
2024-09-12 12:07:38 -05:00
|
|
|
const GenericButton = ({ label, icon, onClick, severity, size, className, outlined = false, rounded = false, disabled = false, tooltip = null, tooltipOptions = null, iconPos = "left" }) => {
|
2024-09-10 15:44:08 -05:00
|
|
|
const windowWidth = useWindowWidth();
|
|
|
|
return (
|
2024-09-12 12:07:38 -05:00
|
|
|
<Button label={label} icon={icon} iconPos={iconPos} onClick={onClick} severity={severity} size={size || (windowWidth < 768 ? 'small' : 'normal')} className={className} outlined={outlined} rounded={rounded} disabled={disabled} tooltip={tooltip} tooltipOptions={tooltipOptions} />
|
|
|
|
);
|
2024-09-10 15:44:08 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
export default GenericButton;
|