fix plugins cardColumn layout

This commit is contained in:
Eduard Heimbuch
2019-09-16 15:31:02 +02:00
parent 0e5a27e850
commit c526c16bf1
3 changed files with 12 additions and 4 deletions

View File

@@ -48,6 +48,7 @@ type Props = {
footerRight: React.Node,
link?: string,
action?: () => void,
className?: string,
// context props
classes: any
@@ -72,13 +73,14 @@ class CardColumn extends React.Component<Props> {
contentRight,
footerLeft,
footerRight,
classes
classes,
className
} = this.props;
const link = this.createLink();
return (
<>
{link}
<article className={classNames("media", classes.inner)}>
<article className={classNames("media", className, classes.inner)}>
<figure className={classNames(classes.centerImage, "media-left")}>
{avatar}
</figure>

View File

@@ -4,7 +4,7 @@ import type {Collection, Links} from "./hal";
export type Plugin = {
name: string,
version: string,
newVersion: string,
newVersion?: string,
displayName: string,
description?: string,
author: string,

View File

@@ -35,6 +35,11 @@ const styles = {
position: "absolute",
right: 0,
top: 0
},
layout: {
"& .level": {
paddingBottom: "0.5rem"
}
}
};
@@ -128,7 +133,7 @@ class PluginEntry extends React.Component<Props, State> {
};
render() {
const { plugin } = this.props;
const { plugin, classes } = this.props;
const { showModal } = this.state;
const avatar = this.createAvatar(plugin);
const actionbar = this.createActionbar();
@@ -139,6 +144,7 @@ class PluginEntry extends React.Component<Props, State> {
return (
<>
<CardColumn
className={classes.layout}
action={this.isInstallable() ? this.toggleModal : null}
avatar={avatar}
title={plugin.displayName ? plugin.displayName : plugin.name}