make the whole plugin card clickable and moved spinner to upper right corner

This commit is contained in:
Sebastian Sdorra
2019-08-21 15:42:03 +02:00
parent 707d3d2fd7
commit e64699bfc8
2 changed files with 32 additions and 17 deletions

View File

@@ -46,7 +46,8 @@ type Props = {
contentRight?: React.Node,
footerLeft: React.Node,
footerRight: React.Node,
link: string,
link?: string,
action?: () => void,
// context props
classes: any
@@ -54,9 +55,11 @@ type Props = {
class CardColumn extends React.Component<Props> {
createLink = () => {
const { link } = this.props;
const { link, action } = this.props;
if (link) {
return <Link className="overlay-column" to={link} />;
} else if (action) {
return <a className="overlay-column" onClick={e => {e.preventDefault(); action();}} href="#" />;
}
return null;
};