-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #605 from danskernesdigitalebibliotek/release/herm…
…od-13 Hermod sprint 13
- Loading branch information
Showing
7 changed files
with
116 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions
26
src/stories/Library/event-list-stacked/EventListStacked.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import React from "react"; | ||
import { ContentListItem } from "../content-list-item/ContentListItem"; | ||
import ContentListItemStacked from "../content-list-item/ContentListItemStacked"; | ||
import contentListData from "../content-list/ContentListData"; | ||
|
||
interface PromoteEventsListProps { | ||
title: string; | ||
} | ||
|
||
const EventListStacked: React.FC<PromoteEventsListProps> = ({ title }) => { | ||
return ( | ||
<section className="event-list-stacked"> | ||
<h2 className="event-list-stacked__heading">{title}</h2> | ||
<ContentListItem {...contentListData[0]} /> | ||
{contentListData.map((event) => ( | ||
<ContentListItemStacked | ||
title={event.title} | ||
href={event.href} | ||
time={event.time} | ||
date={event.date} | ||
/> | ||
))} | ||
</section> | ||
); | ||
}; | ||
export default EventListStacked; |
9 changes: 9 additions & 0 deletions
9
src/stories/Library/event-list-stacked/event-list-stacked.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.event-list-stacked { | ||
@include layout-container($layout__max-width--medium); | ||
@include block-spacing(); | ||
} | ||
|
||
.event-list-stacked__heading { | ||
@include typography($typo__h2); | ||
margin-bottom: $s-xl; | ||
} |
21 changes: 21 additions & 0 deletions
21
src/stories/Library/event-list-stacked/eventListStacked.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { ComponentMeta, ComponentStory } from "@storybook/react"; | ||
import EventListStacked from "./EventListStacked"; | ||
|
||
export default { | ||
title: "Library/ Stacked Event List", | ||
|
||
component: EventListStacked, | ||
argTypes: { | ||
title: { | ||
defaultValue: "Kommende arrangementer", | ||
control: "text", | ||
description: "Title of the section", | ||
}, | ||
}, | ||
} as ComponentMeta<typeof EventListStacked>; | ||
|
||
const Template: ComponentStory<typeof EventListStacked> = (args) => ( | ||
<EventListStacked {...args} /> | ||
); | ||
|
||
export const FilteredList = Template.bind({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters