UNPKG

mdc-react

Version:

Material Components for the web implemented in React

26 lines (20 loc) 649 B
import { forwardRef } from 'react'; import classnames from 'classnames'; import { cssClasses } from './constants'; const CardPrimaryAction = forwardRef(({ element = 'div', component: Element = element, className, children, ...props }, ref) => { const classNames = classnames(cssClasses.PRIMARY_ACTION, className); return ( <Element ref={ref} className={classNames} tabIndex="0" {...props}> {children} <div className={cssClasses.RIPPLE} /> </Element> ); }); CardPrimaryAction.displayName = 'MDCCardPrimaryAction'; export default CardPrimaryAction;