Made with create-react-library
npm install --save @berserk-code/react-clock
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
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 |
MIT © merq-rodriguez