mirror of
https://github.com/mue/mue.git
synced 2026-07-17 14:04:09 +02:00
feat: analog time settings
This commit is contained in:
@@ -97,8 +97,22 @@ export default class Clock extends React.PureComponent {
|
||||
render() {
|
||||
let clockHTML = <h1 className='clock'>{this.state.time}<span className='ampm'>{this.state.ampm}</span></h1>;
|
||||
|
||||
const checkValue = (setting) => {
|
||||
return (localStorage.getItem(setting) === 'true');
|
||||
}
|
||||
|
||||
if (localStorage.getItem('timeType') === 'analogue') {
|
||||
clockHTML = <Analog className='analogclock' value={this.state.time} renderHourMarks={false} renderMinuteMarks={false} />;
|
||||
clockHTML = (
|
||||
<Analog
|
||||
className='analogclock'
|
||||
value={this.state.time}
|
||||
renderHourMarks={checkValue('hourMarks')}
|
||||
renderMinuteMarks={checkValue('minuteMarks')}
|
||||
renderSecondHand={checkValue('secondHand')}
|
||||
renderMinuteHand={checkValue('minuteHand')}
|
||||
renderHourHand={checkValue('hourHand')}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return clockHTML;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
border: 1px solid map-get($theme-colours, 'main') !important;
|
||||
}
|
||||
|
||||
.react-clock__hand__body {
|
||||
.react-clock__hand__body, .react-clock__mark__body {
|
||||
background: map-get($theme-colours, 'main') !important;
|
||||
box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user