website-session-kit
Version:
A modular and extensible session management toolkit for modern websites.
8 lines (7 loc) • 944 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { FaRegCheckCircle } from 'react-icons/fa';
const defaultColor = "text-[#e16a3d]";
const IconText = ({ text, icon, iconColor = defaultColor, iconSize = 'text-2xl', textColor = '', textSize = 'text-base', responsive = false, className = '', }) => {
return (_jsxs("div", { className: `flex ${responsive ? 'flex-col sm:flex-row sm:items-center py-4 sm:p-3 sm:py-3' : 'flex-row items-center px-3 py-2'} ${className}`, children: [_jsx("div", { className: `flex ${responsive ? 'justify-center sm:justify-start' : 'justify-start'} items-center w-full sm:w-auto`, children: _jsx("span", { className: `flex-shrink-0 mr-3 ${iconColor} ${iconSize}`, children: icon || _jsx(FaRegCheckCircle, {}) }) }), _jsx("span", { className: `${responsive ? 'text-center sm:text-start' : 'text-start'} break-normal ${textSize} ${textColor}`, children: text })] }));
};
export default IconText;