UNPKG

flowbite-react

Version:

Official React components built for Flowbite and Tailwind CSS

14 lines (11 loc) 427 B
'use client'; import { forwardRef, createElement } from 'react'; const ButtonBase = forwardRef( ({ children, as: Component, href, type = "button", ...props }, ref) => { const BaseComponent = Component || (href ? "a" : "button"); return createElement(BaseComponent, { ref, href, type, ...props }, children); } ); ButtonBase.displayName = "ButtonBase"; export { ButtonBase }; //# sourceMappingURL=ButtonBase.js.map