0.7.0 • Published 7 years ago
watchface v0.7.0
Installation
Install the package with the following terminal command: npm install watchface --save
Configuration
Once the package is installed, use the code below to re-create the 'New York' watch face from the demo above.
import WatchFace from 'watchface';
const config = {
borderRadius: 50,
burst: true,
hands: [
{
border: 'solid 1px #000000',
color: '#94c11c',
height: 6,
width: 30,
type: 'hour'
},
{
color: '#009bb4',
height: 4,
width: 40,
type: 'minute'
}
],
indexes: [
{
color: '#009bb4'
},
{
color: '#ffffff'
},
{
color: '#009bb4'
},
{
color: '#ffffff'
},
{
color: '#009bb4'
},
{
color: 'transparent'
},
{
color: '#009bb4'
},
{
color: '#ffffff'
},
{
color: '#009bb4'
},
{
color: '#ffffff'
},
{
color: '#009bb4'
},
{
color: 'transparent'
}
],
subDial: {
backgroundColor: '#ffffff',
borderRadius: 50,
burst: true,
hands: [
{
color: '#e3000f',
height: 2,
width: 45,
type: 'second'
}
],
indexes: {
color: '#000000'
}
},
timeZone: -4
}
ReactDOM.render(
<WatchFace config={config} />
);