import * as React from "react" ; import { StyledCardClickable } from "./CardStyledComponents" ; export interface CardClickableProps { disabled ? : boolean ; onClick ? ( ... args ) : void ; } export const CardClickable = props => { const onClick = ( ... args ) => { if ( ! props . disabled && props . onClick ) { props . onClick ( ... args ) ; } } ; return < StyledCardClickable onClick = { onClick } > { props . children } < /StyledCardClickable>; } ;