mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-23 00:46:30 +00:00
Use fallback icon on plugin page (#1268)
This commit is contained in:
parent
47315eaac0
commit
7686d4c8c3
2 changed files with 4 additions and 4 deletions
|
@ -44,8 +44,8 @@ export const IconWebsite = (size = 32) => (
|
|||
</svg>
|
||||
);
|
||||
|
||||
export const IconPlugin = () => (
|
||||
<svg style={{ width: '100%', maxWidth: '50px' }} viewBox="0 0 24 24">
|
||||
export const IconPlugin = (maxWidth = 50) => (
|
||||
<svg style={{ width: '100%', maxWidth: `${maxWidth}px` }} viewBox="0 0 24 24">
|
||||
<g fill="none">
|
||||
<path d="M0 0h24v24H0z" />
|
||||
<path
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import Layout from '@theme/Layout';
|
||||
import { WoodpeckerPlugin as WoodpeckerPluginType } from '../types';
|
||||
import { IconContainer, IconVerified, IconWebsite } from './Icons';
|
||||
import { IconContainer, IconPlugin, IconVerified, IconWebsite } from './Icons';
|
||||
|
||||
export function WoodpeckerPlugin({ plugin }: { plugin: WoodpeckerPluginType }) {
|
||||
return (
|
||||
|
@ -61,7 +61,7 @@ export function WoodpeckerPlugin({ plugin }: { plugin: WoodpeckerPluginType }) {
|
|||
<p style={{ marginTop: '2rem', marginBottom: '1rem' }}>{plugin.description}</p>
|
||||
</div>
|
||||
<div className="col col--2">
|
||||
<img src={plugin.icon} width="150" height="150" />
|
||||
{plugin.icon ? <img src={plugin.icon} width="150" /> : IconPlugin(150)}
|
||||
</div>
|
||||
</div>
|
||||
<hr style={{ margin: '1rem 0' }} />
|
||||
|
|
Loading…
Reference in a new issue