New extension points for repository overview (#1828)

The landing-page-plugin is being reworked and integrated into the repository overview. This requires new extension points and slightly adjusted components to better match the repository overview page visually. Also, binder options can now be passed as an object which offer a new priority option that causes sorting in descending order.
This commit is contained in:
Konstantin Schaper
2021-10-19 09:31:40 +02:00
committed by GitHub
parent 35f4cb3e61
commit 57aacba03a
15 changed files with 347 additions and 78 deletions

View File

@@ -27,6 +27,7 @@ import { storiesOf } from "@storybook/react";
import CardColumnSmall from "./CardColumnSmall";
import Icon from "./Icon";
import styled from "styled-components";
import DateFromNow from "./DateFromNow";
const Wrapper = styled.div`
margin: 2rem;
@@ -39,9 +40,22 @@ const contentLeft = <strong className="m-0">main content</strong>;
const contentRight = <small>more text</small>;
storiesOf("CardColumnSmall", module)
.addDecorator(story => <MemoryRouter initialEntries={["/"]}>{story()}</MemoryRouter>)
.addDecorator(storyFn => <Wrapper>{storyFn()}</Wrapper>)
.addDecorator((story) => <MemoryRouter initialEntries={["/"]}>{story()}</MemoryRouter>)
.addDecorator((storyFn) => <Wrapper>{storyFn()}</Wrapper>)
.add("Default", () => (
<CardColumnSmall link={link} avatar={icon} contentLeft={contentLeft} contentRight={contentRight} />
))
.add("Minimal", () => <CardColumnSmall link={link} contentLeft={contentLeft} contentRight={contentRight} />);
.add("Minimal", () => <CardColumnSmall link={link} contentLeft={contentLeft} contentRight={contentRight} />)
.add("Task", () => (
<CardColumnSmall
link={link}
avatar={<Icon name="exchange-alt" className="fa-fw fa-lg" color="inherit" />}
contentLeft={<strong>Repository created</strong>}
contentRight={
<small>
<DateFromNow date={new Date(1634287231)} />
</small>
}
footer="New: scmadmin/spaceship"
/>
));