New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bbc/psammead-timestamp-container

Package Overview
Dependencies
Maintainers
38
Versions
143
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bbc/psammead-timestamp-container - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

1

CHANGELOG.md

@@ -6,2 +6,3 @@ # Psammead Timestamp Container Changelog

|---------|-------------|
| 2.2.0 | [PR#1245](https://github.com/bbc/psammead/pull/1245) The storybook stories now include the ability to change the service |
| 2.1.0 | [PR#1233](https://github.com/bbc/psammead/pull/1233) Add ESM modules entry |

@@ -8,0 +9,0 @@ | 2.0.0 | [PR#1182](https://github.com/bbc/psammead/pull/1182) Add `service` prop and use `gel-foundations@3.0.3`, `psammead-timestamp@2.0.4`, `psammead-test-helpers@1.0.2` |

3

package.json
{
"name": "@bbc/psammead-timestamp-container",
"version": "2.1.0",
"version": "2.2.0",
"main": "dist/index.js",

@@ -33,2 +33,3 @@ "module": "esm/index.js",

"devDependencies": {
"@bbc/psammead-storybook-helpers": "^3.3.0",
"@bbc/psammead-test-helpers": "^1.0.2",

@@ -35,0 +36,0 @@ "react": "^16.8.6"

import React from 'react';
import { storiesOf } from '@storybook/react'; // eslint-disable-line import/no-extraneous-dependencies
import { latin } from '@bbc/gel-foundations/scripts';
import { withKnobs, text, number, boolean } from '@storybook/addon-knobs';
import { dirDecorator } from '@bbc/psammead-storybook-helpers';
import Timestamp from '.';

@@ -9,3 +9,4 @@

.addDecorator(withKnobs)
.add('default', () => (
.addDecorator(dirDecorator)
.add('default', ({ service, script }) => (
<Timestamp

@@ -16,7 +17,7 @@ timestamp={number('Unix timestamp', 1530947227000)}

isRelative={boolean('isRelative', false)}
script={latin}
service="news"
script={script}
service={service}
/>
))
.add('with prefix', () => (
.add('with prefix', ({ service, script }) => (
<Timestamp

@@ -28,7 +29,7 @@ timestamp={number('Unix timestamp', 1552666749637)}

prefix={text('Prefix text', 'Updated')}
script={latin}
service="news"
script={script}
service={service}
/>
))
.add('with prefix and suffix', () => (
.add('with prefix and suffix', ({ service, script }) => (
<Timestamp

@@ -41,7 +42,7 @@ timestamp={number('Unix timestamp', 1530947227000)}

suffix={text('Suffix text', 'is date of last update')}
script={latin}
service="news"
script={script}
service={service}
/>
))
.add('with locale', () => (
.add('with locale', ({ service, script, locale }) => (
<Timestamp

@@ -52,6 +53,6 @@ timestamp={number('Unix timestamp', 1530947227000)}

isRelative={boolean('isRelative', false)}
script={latin}
locale={text('Locale', 'fa')}
service="persian"
script={script}
locale={locale}
service={service}
/>
));
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