@berserk-code/react-clock

1.0.1 • Public • Published

@berserk-code/react-clock

Made with create-react-library

NPM JavaScript Style Guide

Screen-Capture_select-area_20210104105105.gif Screen-Capture_select-area_20210104105105.gif

Install

npm install --save @berserk-code/react-clock

Usage

import React from 'react'
import Clock from '@berserk-code/react-clock'

const App = () => {
  const color = '#59df7a';
  const dateColor = '#09b8be';
  return <Clock
    gradient
    color={color}
    dateColor={dateColor}
    locales={['es-ES']}
    optionsLocaleDate={{ weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }}
    optionLocaleTime={{ hour12: true, hour: '2-digit', minute: '2-digit', second: '2-digit' }}
  />
}

export default App

Properties

Property Type Default Description
gradient boolean false Add background gradiant default
color string #59df7a Set color of clock canvas
dateColor string #09b8be Set color of date and time inside the clock
locales array ['es-ES'] Set locale language
optionsLocaleDate object required Set locale options for toLocaleDateString function
optionLocaleTime object required Set locale options for toLocaleTimeString function

License

MIT © merq-rodriguez

Readme

Keywords

none

Package Sidebar

Install

npm i @berserk-code/react-clock

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

24.6 kB

Total Files

7

Last publish

Collaborators

  • stiivcode