2.0.1 • Published 5 months ago

themed-digital-clock v2.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
5 months ago

themed-digital-clock Weekly downloads

A digital clock with a dark and a light theme


Demo

You can access the storybook for this component here.

Props

The component accepts the props defined bellow in the table.

Props accepted by ThemedDigitalClock

NameTypeRequiredDefaultDescription
dateDatenoundefinedForce the clock to start displaying the time with the time of this date
descriptionstringnoundefinedThe text displayed bellow the clock
sizenumber | stringno100%The size of the clock
styleCSSPropertiesno{}The style for root element (overwrite any internal style)
timezoneNamestringnobrowser's timezoneThe timezone for which is displayed teh time (if date is not set)
useDarkThemebooleannofalseDefine which theme is used (light or dark)

Note: date is thought to be used only for testing and in storybook.


Versions

ThemedDigitalClock usesReact
1.0.x16.9.0
1.1.x16.9.0
1.2.x16.9.0 or 17.0.0
2.0.x>=18.0.0

About versioning schema used for ThemedDigitalClock

  • Major - it will be increased if the major version of the dependat package changes or there are breaking changes in the code of ThemedDigitalClock
  • Minor - it will be increased if no major version of the dependat package changes, but there are changes of the minor or patch versions of it
  • Patch - it will be increased if there are no changes of the dependat packages, but there are non breaking changes in the code of ThemedDigitalClock

Example

Displaying a digital clock in a dark theme:

import * as React from 'react';
import ThemedDigitalClock from 'themed-digital-clock';

class App extends React.Component {
  render() {
    return (
      <div className="App">
        <ThemedDigitalClock
          description="The time now in New York"
          timezoneName="America/New_York"
          useDarkTheme={true}
          size={400}
        />
      </div>
    );
  }
}

export default App;

Changelog

1.0.0

  • themed-digital-clock is made publicly available

1.0.1

  • Added a prop for defining the height of the clock

1.1.0

  • Updated packages

1.1.1

  • Updated packages
  • Moved from npm to yarn

1.1.2

  • Updated packages

1.1.3

  • Updated packages

1.1.4

  • Fixed crash produced by "export * from"

1.2.0

  • Accepting React 17 as peerDependencies
  • Fixed security warnings

1.2.1

  • Updated the packages

2.0.0

  • Supports minimum React 18
2.0.1

5 months ago

2.0.0

1 year ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago