UNPKG

@vertisanpro/flowbite-react

Version:

Non-Official React components built for Flowbite and Tailwind CSS

12 lines (11 loc) 629 B
import { twMerge } from '@vertisanpro/tailwind-merge'; import React from 'react'; import { mergeDeep } from '../../helpers/merge-deep'; import { getTheme } from '../../theme-store'; export const Kbd = ({ children, className, icon: Icon, theme: customTheme = {}, ...props }) => { const theme = mergeDeep(getTheme().kbd, customTheme); return (React.createElement("span", { className: twMerge(theme.root.base, className), "data-testid": "flowbite-kbd", ...props }, Icon && React.createElement(Icon, { className: theme.root.icon, "data-testid": "flowbite-kbd-icon" }), children)); }; Kbd.displayName = 'Kbd';