mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 06:25:45 +01:00
fix plugins cardColumn layout
This commit is contained in:
@@ -48,6 +48,7 @@ type Props = {
|
|||||||
footerRight: React.Node,
|
footerRight: React.Node,
|
||||||
link?: string,
|
link?: string,
|
||||||
action?: () => void,
|
action?: () => void,
|
||||||
|
className?: string,
|
||||||
|
|
||||||
// context props
|
// context props
|
||||||
classes: any
|
classes: any
|
||||||
@@ -72,13 +73,14 @@ class CardColumn extends React.Component<Props> {
|
|||||||
contentRight,
|
contentRight,
|
||||||
footerLeft,
|
footerLeft,
|
||||||
footerRight,
|
footerRight,
|
||||||
classes
|
classes,
|
||||||
|
className
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const link = this.createLink();
|
const link = this.createLink();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{link}
|
{link}
|
||||||
<article className={classNames("media", classes.inner)}>
|
<article className={classNames("media", className, classes.inner)}>
|
||||||
<figure className={classNames(classes.centerImage, "media-left")}>
|
<figure className={classNames(classes.centerImage, "media-left")}>
|
||||||
{avatar}
|
{avatar}
|
||||||
</figure>
|
</figure>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import type {Collection, Links} from "./hal";
|
|||||||
export type Plugin = {
|
export type Plugin = {
|
||||||
name: string,
|
name: string,
|
||||||
version: string,
|
version: string,
|
||||||
newVersion: string,
|
newVersion?: string,
|
||||||
displayName: string,
|
displayName: string,
|
||||||
description?: string,
|
description?: string,
|
||||||
author: string,
|
author: string,
|
||||||
|
|||||||
@@ -35,6 +35,11 @@ const styles = {
|
|||||||
position: "absolute",
|
position: "absolute",
|
||||||
right: 0,
|
right: 0,
|
||||||
top: 0
|
top: 0
|
||||||
|
},
|
||||||
|
layout: {
|
||||||
|
"& .level": {
|
||||||
|
paddingBottom: "0.5rem"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -128,7 +133,7 @@ class PluginEntry extends React.Component<Props, State> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { plugin } = this.props;
|
const { plugin, classes } = this.props;
|
||||||
const { showModal } = this.state;
|
const { showModal } = this.state;
|
||||||
const avatar = this.createAvatar(plugin);
|
const avatar = this.createAvatar(plugin);
|
||||||
const actionbar = this.createActionbar();
|
const actionbar = this.createActionbar();
|
||||||
@@ -139,6 +144,7 @@ class PluginEntry extends React.Component<Props, State> {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<CardColumn
|
<CardColumn
|
||||||
|
className={classes.layout}
|
||||||
action={this.isInstallable() ? this.toggleModal : null}
|
action={this.isInstallable() ? this.toggleModal : null}
|
||||||
avatar={avatar}
|
avatar={avatar}
|
||||||
title={plugin.displayName ? plugin.displayName : plugin.name}
|
title={plugin.displayName ? plugin.displayName : plugin.name}
|
||||||
|
|||||||
Reference in New Issue
Block a user