Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@financial-times/community-event-teaser

Package Overview
Dependencies
Maintainers
17
Versions
215
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@financial-times/community-event-teaser - npm Package Compare versions

Comparing version 0.0.2 to 1.0.0

.storybook/storybook.scss

4

dist/index.d.ts
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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc