3.0.2 • Published 5 months ago

themed-analog-clock v3.0.2

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

themed-analog-clock Weekly downloads

An analog 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 ThemedAnalogClock

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

ThemedAnalogClock usesReact
1.0.x16.8.6
2.0.x16.8.6
2.1.x16.9.0
2.2.x16.9.0 or 17.0.0
3.0.x>=18.0.0

About versioning schema used for ThemedAnalogClock

  • Major - it will be increased if the major version of the dependat package changes or there are breaking changes in the code of ThemedAnalogClock
  • 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 ThemedAnalogClock

Example

Displaying an analog clock in a dark theme:

import * as React from 'react';
import ThemedAnalogClock from 'themed-analog-clock';

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

export default App;

Changelog

1.0.0

  • themed-analog-clock is made publicly available

1.0.1

  • Fixed the bug related to displaying in dark mode the text outside of the dark background

2.0.0

  • Breaking change: renamed prop title to description

2.0.1

  • Added a prop style to style the root element (use it to customize the look of the current theme)

2.0.2

  • Fixed the name of some svg elements

2.1.0

  • Upgraded packages

2.1.1

  • Updated packages
  • Moved from npm to yarn

2.1.2

  • Updated packages

2.1.3

  • Updated packages

2.1.4

  • Fixed crash produced by "export * from"

2.2.0

  • Accepting React 17 as peerDependencies
  • Fixed security warnings

2.2.1

  • Updated the packages

3.0.0

  • Supports minimum React 18
3.0.2

5 months ago

3.0.1

5 months ago

3.0.0

1 year ago

2.2.1

3 years ago

2.1.4

4 years ago

2.1.3

4 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago