From 3563c0a857ad078f822fce2efcbb0d586fdbb59f Mon Sep 17 00:00:00 2001 From: Pramod Mahajan Date: Fri, 25 Apr 2025 12:28:30 +0530 Subject: [PATCH] added one more css property radius --- src/components/common/IconButton.jsx | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/components/common/IconButton.jsx diff --git a/src/components/common/IconButton.jsx b/src/components/common/IconButton.jsx new file mode 100644 index 00000000..362c1db9 --- /dev/null +++ b/src/components/common/IconButton.jsx @@ -0,0 +1,45 @@ +import React from "react"; + +// Light background mapping for Bootstrap theme colors +const lightBackgrounds = { + primary: "#e3f2fd", + secondary: "#E9EEF4", + success: "#e6f4ea", + danger: "#fdecea", + warning: "#fff3cd", + info: "#e0f7fa", + dark: "#e9ecef", +}; + +const IconButton = ({ + iconClass, // icon class string like 'bx bx-user' + color = "primary", + onClick, + size = 20, + radius=null, + style = {}, + ...rest +}) => { + const backgroundColor = lightBackgrounds[color] || "#f8f9fa"; + const iconColor = `var(--bs-${color})`; + + return ( + + ); +}; + +export default IconButton;