-
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.
The `EventDescription` component is now part of the `EventPage`. It includes all the necessary markup and CSS for the description section. The properties for `EventDescription` have been added to `EventPage.stories`, as it is used exclusively within the `EventPage`.
- Loading branch information
1 parent
f0f4649
commit f89f34d
Showing
6 changed files
with
184 additions
and
3 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
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
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
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
40 changes: 40 additions & 0 deletions
40
src/stories/Library/event-description/EventDescription.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,40 @@ | ||
import { FC } from "react"; | ||
import HorizontalTermLine, { | ||
HorizontalTermLineProps, | ||
generateId, | ||
} from "../horizontal-term-line/HorizontalTermLine"; | ||
import ListDescription, { | ||
ListData, | ||
} from "../Lists/list-description/ListDescription"; | ||
|
||
export type EventDescriptionProps = { | ||
descriptionTitle: string; | ||
listDescriptionData: ListData; | ||
horizontalTermLineData: HorizontalTermLineProps[]; | ||
descriptionDescription: string; | ||
}; | ||
|
||
const EventDescription: FC<EventDescriptionProps> = ({ | ||
descriptionTitle, | ||
descriptionDescription, | ||
horizontalTermLineData, | ||
listDescriptionData, | ||
}) => { | ||
return ( | ||
<section className="event-description"> | ||
<h2 className="event-description__title">{descriptionTitle}</h2> | ||
<p className="event-description__description">{descriptionDescription}</p> | ||
<div className="event-description__links"> | ||
{horizontalTermLineData.map((item, index) => ( | ||
<HorizontalTermLine {...item} key={generateId(index)} /> | ||
))} | ||
</div> | ||
<ListDescription | ||
className="event-description__info list-description--event" | ||
data={listDescriptionData} | ||
/> | ||
</section> | ||
); | ||
}; | ||
|
||
export default EventDescription; |
49 changes: 49 additions & 0 deletions
49
src/stories/Library/event-description/event-description.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,49 @@ | ||
.event-description { | ||
@include container(medium); | ||
padding: $s-md; | ||
@include breakpoint-s { | ||
padding: $s-xl $s-4xl; | ||
display: grid; | ||
column-gap: $s-xl; | ||
grid-template-areas: | ||
"title title title" | ||
"description description info" | ||
"links links links"; | ||
} | ||
} | ||
|
||
.event-description__title { | ||
grid-area: title; | ||
@extend %text-header-h4; | ||
margin-bottom: $s-md; | ||
|
||
@include breakpoint-s { | ||
margin-bottom: $s-lg; | ||
} | ||
} | ||
|
||
.event-description__description { | ||
grid-area: description; | ||
@extend %text-body-large; | ||
line-height: 24px; | ||
margin-bottom: $s-md; | ||
|
||
@include breakpoint-s { | ||
margin-bottom: 0; | ||
line-height: 32px; | ||
} | ||
} | ||
|
||
.event-description__links { | ||
grid-area: links; | ||
margin-bottom: $s-2xl; | ||
|
||
@include breakpoint-s { | ||
margin-bottom: 0; | ||
margin-top: $s-md; | ||
} | ||
} | ||
|
||
.event-description__info { | ||
grid-area: info; | ||
} |