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

react-live-clock

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-live-clock - npm Package Compare versions

Comparing version 5.5.1 to 5.6.0

# Changelog
## [5.6.0]
Adds Element passthrough prop
Bumps eslint from 8.6.0 to 8.7.0 #149
Bumps follow-redirects from 1.13.3 to 1.14.7 #148
Relaces react-highlight.js for react-syntax-highlighter
## [5.5.1]

@@ -4,0 +10,0 @@ Rebuilds to insure proper updates

@@ -33,2 +33,3 @@ 'use strict';

date = props.date,
element = props.element,
filter = props.filter,

@@ -126,2 +127,3 @@ format = props.format,

date: ticking ? '' : date,
element: element,
filter: filter,

@@ -139,2 +141,3 @@ format: formatToUse,

date: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]),
element: _propTypes2.default.oneOfType([_propTypes2.default.element, _propTypes2.default.node, _propTypes2.default.string]),
blinking: _propTypes2.default.bool,

@@ -154,2 +157,3 @@ locale: _propTypes2.default.string,

date: null,
element: 'time',
blinking: false,

@@ -156,0 +160,0 @@ format: 'HH:mm',

{
"name": "react-live-clock",
"version": "5.5.1",
"version": "5.6.0",
"description": "React Live Clock",

@@ -45,3 +45,3 @@ "main": "lib/index.js",

"cf-react-component-template": "0.1.8",
"eslint": "8.6.0",
"eslint": "8.7.0",
"eslint-plugin-react": "7.28.0",

@@ -56,4 +56,5 @@ "moment": "^2.29.1",

"react-moment": "1.1.1",
"react-router-dom": "6.2.1"
"react-router-dom": "6.2.1",
"react-syntax-highlighter": "15.4.5"
}
}

@@ -11,2 +11,3 @@ import React, {useState, useEffect} from 'react';

date,
element,
filter,

@@ -92,2 +93,3 @@ format,

date={ticking ? '' : date}
element={element}
filter={filter}

@@ -109,2 +111,7 @@ format={formatToUse}

]),
element: PropTypes.oneOfType([
PropTypes.element,
PropTypes.node,
PropTypes.string
]),
blinking: PropTypes.bool,

@@ -130,2 +137,3 @@ locale: PropTypes.string,

date: null,
element: 'time',
blinking: false,

@@ -132,0 +140,0 @@ format: 'HH:mm',

import React from 'react';
import PropTypes from 'prop-types';
import Highlight from 'react-highlight.js';
import SyntaxHighlighter from 'react-syntax-highlighter';
import {vscDarkPlus} from 'react-syntax-highlighter/dist/esm/styles/prism';
import moment from 'moment-timezone';

@@ -23,5 +24,5 @@ import Clock from '../..';

<h6>Code:</h6>
<Highlight language={'jsx'}>
<SyntaxHighlighter language={'jsx'} style={vscDarkPlus}>
{code}
</Highlight>
</SyntaxHighlighter>
<h6>Output:</h6>

@@ -241,4 +242,10 @@ {children}

</Panel>
<Panel
code="<Clock element='h1' />"
title="custom element">
<Clock element="h1" />
</Panel>
</div>);
export default App;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display