Skip to content

Commit

Permalink
prettier, linting, stories
Browse files Browse the repository at this point in the history
  • Loading branch information
tobek committed Nov 26, 2018
1 parent e0f52b1 commit f073adc
Show file tree
Hide file tree
Showing 29 changed files with 5,771 additions and 5,099 deletions.
14 changes: 10 additions & 4 deletions packages/components/src/ListingDetailHeader.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { storiesOf } from "@storybook/react";
import * as React from "react";
import styled from "styled-components";
import { CharterData } from "@joincivil/core";
import { ListingDetailHeader, ListingDetailHeaderProps } from "./ListingDetailHeader";

const StyledDiv = styled.div`
Expand All @@ -16,11 +17,16 @@ const Container: React.StatelessComponent = ({ children }) => (
</StyledDiv>
);

const charter = {
tagline: "Civil is the decentralized marketplace for sustainable journalism.",
newsroomUrl: "https://civil.co",
};

storiesOf("Listing Details Header", module)
.add("No phase label", () => {
const props: ListingDetailHeaderProps = {
newsroomName: "The Civil Times",
newsroomDescription: "Civil is the decentralized marketplace for sustainable journalism.",
charter: charter as CharterData,
owner: "0x0",
unstakedDeposit: "100 CVL",
isInApplication: false,
Expand All @@ -36,7 +42,7 @@ storiesOf("Listing Details Header", module)
.add("In Application", () => {
const props: ListingDetailHeaderProps = {
newsroomName: "The Civil Times",
newsroomDescription: "Civil is the decentralized marketplace for sustainable journalism.",
charter: charter as CharterData,
owner: "0x0",
unstakedDeposit: "100 CVL",
isInApplication: true,
Expand All @@ -52,7 +58,7 @@ storiesOf("Listing Details Header", module)
.add("Accepting Votes", () => {
const props: ListingDetailHeaderProps = {
newsroomName: "The Civil Times",
newsroomDescription: "Civil is the decentralized marketplace for sustainable journalism.",
charter: charter as CharterData,
owner: "0x0",
unstakedDeposit: "100 CVL",
isInApplication: false,
Expand All @@ -68,7 +74,7 @@ storiesOf("Listing Details Header", module)
.add("Revealing Votes", () => {
const props: ListingDetailHeaderProps = {
newsroomName: "The Civil Times",
newsroomDescription: "Civil is the decentralized marketplace for sustainable journalism.",
charter: charter as CharterData,
owner: "0x0",
unstakedDeposit: "100 CVL",
isInApplication: false,
Expand Down
8 changes: 7 additions & 1 deletion packages/components/src/ListingDetailHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,13 @@ export class ListingDetailHeader extends React.Component<ListingDetailHeaderProp

<ListingDetailNewsroomName>{this.props.newsroomName}</ListingDetailNewsroomName>
<ListingDetailNewsroomDek>{newsroomDescription}</ListingDetailNewsroomDek>
{newsroomUrl && <ButtonWrap><Button size={buttonSizes.MEDIUM_WIDE} href={newsroomUrl} target="_blank">Visit Newsroom 🡭</Button></ButtonWrap>}
{newsroomUrl && (
<ButtonWrap>
<Button size={buttonSizes.MEDIUM_WIDE} href={newsroomUrl} target="_blank">
Visit Newsroom 🡭
</Button>
</ButtonWrap>
)}
</LeftShark>

<RightShark>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`Storyshots Listing Details Phase Card Appeal Challenge: Commit Vote 1`]
initialize {
"0": Object {
"attribs": Object {
"class": "sc-fONwsr fzhybC",
"class": "sc-VJcYb gwgObu",
},
"children": Array [
Object {
Expand Down Expand Up @@ -62,7 +62,7 @@ exports[`Storyshots Listing Details Phase Card Appeal Challenge: Resolve 1`] = `
initialize {
"0": Object {
"attribs": Object {
"class": "sc-fONwsr fzhybC",
"class": "sc-VJcYb gwgObu",
},
"children": Array [
Object {
Expand Down Expand Up @@ -120,7 +120,7 @@ exports[`Storyshots Listing Details Phase Card Appeal Challenge: Reveal Vote - U
initialize {
"0": Object {
"attribs": Object {
"class": "sc-fONwsr fzhybC",
"class": "sc-VJcYb gwgObu",
},
"children": Array [
Object {
Expand Down Expand Up @@ -178,7 +178,7 @@ exports[`Storyshots Listing Details Phase Card Appeal Challenge: Reveal Vote - U
initialize {
"0": Object {
"attribs": Object {
"class": "sc-fONwsr fzhybC",
"class": "sc-VJcYb gwgObu",
},
"children": Array [
Object {
Expand Down Expand Up @@ -236,7 +236,7 @@ exports[`Storyshots Listing Details Phase Card Appeal Challenge: Reveal Vote - U
initialize {
"0": Object {
"attribs": Object {
"class": "sc-fONwsr fzhybC",
"class": "sc-VJcYb gwgObu",
},
"children": Array [
Object {
Expand Down Expand Up @@ -294,7 +294,7 @@ exports[`Storyshots Listing Details Phase Card In Application 1`] = `
initialize {
"0": Object {
"attribs": Object {
"class": "sc-fONwsr fzhybC",
"class": "sc-VJcYb gwgObu",
},
"children": Array [
Object {
Expand Down Expand Up @@ -352,7 +352,7 @@ exports[`Storyshots Listing Details Phase Card Rejected 1`] = `
initialize {
"0": Object {
"attribs": Object {
"class": "sc-fONwsr fzhybC",
"class": "sc-VJcYb gwgObu",
},
"children": Array [
Object {
Expand Down Expand Up @@ -410,7 +410,7 @@ exports[`Storyshots Listing Details Phase Card Resolve Application 1`] = `
initialize {
"0": Object {
"attribs": Object {
"class": "sc-fONwsr fzhybC",
"class": "sc-VJcYb gwgObu",
},
"children": Array [
Object {
Expand Down Expand Up @@ -468,7 +468,7 @@ exports[`Storyshots Listing Details Phase Card Under Appeal: Awaiting Appeal Dec
initialize {
"0": Object {
"attribs": Object {
"class": "sc-fONwsr fzhybC",
"class": "sc-VJcYb gwgObu",
},
"children": Array [
Object {
Expand Down Expand Up @@ -526,7 +526,7 @@ exports[`Storyshots Listing Details Phase Card Under Appeal: Awaiting Appeal Dec
initialize {
"0": Object {
"attribs": Object {
"class": "sc-fONwsr fzhybC",
"class": "sc-VJcYb gwgObu",
},
"children": Array [
Object {
Expand Down Expand Up @@ -584,7 +584,7 @@ exports[`Storyshots Listing Details Phase Card Under Appeal: Decision / Can Chal
initialize {
"0": Object {
"attribs": Object {
"class": "sc-fONwsr fzhybC",
"class": "sc-VJcYb gwgObu",
},
"children": Array [
Object {
Expand Down Expand Up @@ -642,7 +642,7 @@ exports[`Storyshots Listing Details Phase Card Under Appeal: Resolve 1`] = `
initialize {
"0": Object {
"attribs": Object {
"class": "sc-fONwsr fzhybC",
"class": "sc-VJcYb gwgObu",
},
"children": Array [
Object {
Expand Down Expand Up @@ -700,7 +700,7 @@ exports[`Storyshots Listing Details Phase Card Under Challenge: Commit Vote 1`]
initialize {
"0": Object {
"attribs": Object {
"class": "sc-fONwsr fzhybC",
"class": "sc-VJcYb gwgObu",
},
"children": Array [
Object {
Expand Down Expand Up @@ -758,7 +758,7 @@ exports[`Storyshots Listing Details Phase Card Under Challenge: Request Appeal 1
initialize {
"0": Object {
"attribs": Object {
"class": "sc-fONwsr fzhybC",
"class": "sc-VJcYb gwgObu",
},
"children": Array [
Object {
Expand Down Expand Up @@ -816,7 +816,7 @@ exports[`Storyshots Listing Details Phase Card Under Challenge: Resolve 1`] = `
initialize {
"0": Object {
"attribs": Object {
"class": "sc-fONwsr fzhybC",
"class": "sc-VJcYb gwgObu",
},
"children": Array [
Object {
Expand Down Expand Up @@ -874,7 +874,7 @@ exports[`Storyshots Listing Details Phase Card Under Challenge: Reveal Vote - Us
initialize {
"0": Object {
"attribs": Object {
"class": "sc-fONwsr fzhybC",
"class": "sc-VJcYb gwgObu",
},
"children": Array [
Object {
Expand Down Expand Up @@ -932,7 +932,7 @@ exports[`Storyshots Listing Details Phase Card Under Challenge: Reveal Vote - Us
initialize {
"0": Object {
"attribs": Object {
"class": "sc-fONwsr fzhybC",
"class": "sc-VJcYb gwgObu",
},
"children": Array [
Object {
Expand Down Expand Up @@ -990,7 +990,7 @@ exports[`Storyshots Listing Details Phase Card Under Challenge: Reveal Vote - Us
initialize {
"0": Object {
"attribs": Object {
"class": "sc-fONwsr fzhybC",
"class": "sc-VJcYb gwgObu",
},
"children": Array [
Object {
Expand Down Expand Up @@ -1048,7 +1048,7 @@ exports[`Storyshots Listing Details Phase Card Whitelisted 1`] = `
initialize {
"0": Object {
"attribs": Object {
"class": "sc-fONwsr fzhybC",
"class": "sc-VJcYb gwgObu",
},
"children": Array [
Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`Storyshots Listing History Event Default 1`] = `
initialize {
"0": Object {
"attribs": Object {
"class": "sc-kLIISr hEfuKa",
"class": "sc-qrIAp fVBCWm",
},
"children": Array [],
"name": "div",
Expand Down Expand Up @@ -49,7 +49,7 @@ exports[`Storyshots Listing History Event History Events Timelime 1`] = `
initialize {
"0": Object {
"attribs": Object {
"class": "sc-kLIISr hEfuKa",
"class": "sc-qrIAp fVBCWm",
},
"children": Array [],
"name": "div",
Expand Down
Loading

0 comments on commit f073adc

Please sign in to comment.