@financial-times/community-event-teaser
Advanced tools
Comparing version 0.0.2 to 1.0.0
import { ReactElement } from "react"; | ||
export interface EventDetails { | ||
imgUrl?: string; | ||
title: string; | ||
eventUrl: string; | ||
location: string; | ||
layout: "small" | "large"; | ||
scheduledStartTime: Date; | ||
} | ||
export declare function EventTeaser({ title, eventUrl, location, scheduledStartTime, }: EventDetails): ReactElement; | ||
export declare function EventTeaser({ imgUrl, title, eventUrl, layout, location, scheduledStartTime, }: EventDetails): ReactElement; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -48,3 +48,4 @@ 'use strict'; | ||
var title = _a.title, eventUrl = _a.eventUrl; | ||
return (xEngine.h("a", { className: "event-teaser__title", "data-trackable": "event-teaser-title", href: eventUrl }, title)); | ||
return (xEngine.h("div", { className: "event-teaser__title" }, | ||
xEngine.h("a", { "data-trackable": "event-teaser-title", href: eventUrl }, title))); | ||
}; | ||
@@ -55,2 +56,7 @@ var Location = function (_a) { | ||
}; | ||
var Image = function (_a) { | ||
var url = _a.url, title = _a.title; | ||
return (xEngine.h("div", { className: "event-teaser__image-placeholder" }, | ||
xEngine.h("img", { className: "event-teaser__image", src: url, alt: title }))); | ||
}; | ||
var Timestamp = function (_a) { | ||
@@ -62,8 +68,10 @@ var scheduledStartTime = _a.scheduledStartTime; | ||
function EventTeaser(_a) { | ||
var title = _a.title, eventUrl = _a.eventUrl, location = _a.location, scheduledStartTime = _a.scheduledStartTime; | ||
return (xEngine.h("div", { className: "event-teaser", "data-trackable": "event-teaser" }, | ||
xEngine.h(Timestamp, { scheduledStartTime: scheduledStartTime }), | ||
xEngine.h(Location, { location: location }), | ||
xEngine.h(Title, { title: title, eventUrl: eventUrl }), | ||
xEngine.h(RegisterButton, { title: title, eventUrl: eventUrl }))); | ||
var imgUrl = _a.imgUrl, title = _a.title, eventUrl = _a.eventUrl, layout = _a.layout, location = _a.location, scheduledStartTime = _a.scheduledStartTime; | ||
return (xEngine.h("div", { className: "event-teaser event-teaser--" + layout, "data-trackable": "event-teaser" }, | ||
imgUrl && xEngine.h(Image, { url: imgUrl, title: title }), | ||
xEngine.h("div", { className: "event-teaser__content-container" }, | ||
xEngine.h(Timestamp, { scheduledStartTime: scheduledStartTime }), | ||
xEngine.h(Location, { location: location }), | ||
xEngine.h(Title, { title: title, eventUrl: eventUrl }), | ||
xEngine.h(RegisterButton, { title: title, eventUrl: eventUrl })))); | ||
} | ||
@@ -70,0 +78,0 @@ |
{ | ||
"name": "@financial-times/community-event-teaser", | ||
"version": "0.0.2", | ||
"version": "1.0.0", | ||
"description": "UI for community events", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -23,4 +23,6 @@ # community-event-teaser | ||
<EventTeaser | ||
imgUrl={"https://ftweekend.live.ft.com/some-cool-image-png"} | ||
title={"FTWeekend Festival"} | ||
eventUrl={"https://ftweekend.live.ft.com"} | ||
layout={"large"} | ||
location={"Kenwood House Gardens & Online"} | ||
@@ -27,0 +29,0 @@ scheduledStartTime={new Date("2021-09-04T12:00:00.000Z")} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
700876
10
17371
1
49
0