make right content in cardcolumn hoverable

This commit is contained in:
Eduard Heimbuch
2020-04-09 09:31:13 +02:00
parent f9e24055a4
commit 9cdec81ec0
3 changed files with 72 additions and 7 deletions

View File

@@ -27,6 +27,8 @@ import { storiesOf } from "@storybook/react";
import CardColumn from "./CardColumn";
import Icon from "./Icon";
import styled from "styled-components";
import { DateFromNow } from ".";
import repository from "./__resources__/repository";
const Wrapper = styled.div`
margin: 2rem;
@@ -40,6 +42,7 @@ const avatar = <Icon name="icons fa-2x fa-fw" />;
const title = <strong>title</strong>;
const footerLeft = <small>left footer</small>;
const footerRight = <small>right footer</small>;
const baseDate = "2020-03-26T12:13:42+02:00";
storiesOf("CardColumn", module)
.addDecorator(story => <MemoryRouter initialEntries={["/"]}>{story()}</MemoryRouter>)
@@ -60,4 +63,10 @@ storiesOf("CardColumn", module)
footerLeft={footerLeft}
footerRight={footerRight}
/>
));
))
.add("with hoverable date", () => (
<CardColumn title={title} footerLeft={footerLeft} footerRight={
<small className="level-item">
<DateFromNow baseDate={baseDate} date={repository.creationDate}/>
</small>} />
));