diff options
Diffstat (limited to 'client/components/UI')
| -rw-r--r-- | client/components/UI/Link.jsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/client/components/UI/Link.jsx b/client/components/UI/Link.jsx index f801979..d71582b 100644 --- a/client/components/UI/Link.jsx +++ b/client/components/UI/Link.jsx @@ -2,14 +2,16 @@ import { h, Component } from 'preact' import React from 'react' // import PropTypes from 'prop-types' -const Link = ({ active, children, onClick }) => { +const Link = ({ active, children, onClick, disabled }) => { if (active) { return <span>{children}</span> } + const className = disabled ? 'disabled' : '' return ( // eslint-disable-next-line <a href="#" + class={className} onClick={e => { e.preventDefault() onClick() |
