diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-07-21 04:48:52 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-07-21 04:48:52 +0200 |
| commit | d41070c7b00fafc974a1a6e7b6d1b42391fa57ed (patch) | |
| tree | 4178eba89627e8581cdc5eea65bf7f11591f6b45 /client/components/UI/Link.jsx | |
| parent | d02cbad01f3abfa8a1aad0b55b8bd9cf544090cf (diff) | |
all async paths working
Diffstat (limited to 'client/components/UI/Link.jsx')
| -rw-r--r-- | client/components/UI/Link.jsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/client/components/UI/Link.jsx b/client/components/UI/Link.jsx index d71582b..b4d2d28 100644 --- a/client/components/UI/Link.jsx +++ b/client/components/UI/Link.jsx @@ -2,15 +2,15 @@ import { h, Component } from 'preact' import React from 'react' // import PropTypes from 'prop-types' -const Link = ({ active, children, onClick, disabled }) => { +const Link = ({ href, active, children, onClick, selected, disabled }) => { if (active) { return <span>{children}</span> } - const className = disabled ? 'disabled' : '' - + const className = disabled ? 'disabled' : + selected ? 'selected' : '' return ( // eslint-disable-next-line - <a href="#" + <a href={href || '#'} class={className} onClick={e => { e.preventDefault() |
