mirror of
https://github.com/mue/mue.git
synced 2026-07-26 02:01:19 +02:00
style: Unified spacing to 2 and add editor config
This commit is contained in:
@@ -32,24 +32,24 @@ export default class DateWidget extends React.PureComponent {
|
||||
day = dateYear;
|
||||
year = dateDay;
|
||||
break;
|
||||
default:
|
||||
default:
|
||||
break; // DMY
|
||||
}
|
||||
|
||||
let format;
|
||||
switch (localStorage.getItem('shortFormat')) {
|
||||
case 'dash':
|
||||
format = `${day}-${month}-${year}`;
|
||||
case 'dash':
|
||||
format = `${day}-${month}-${year}`;
|
||||
break;
|
||||
case 'gaps':
|
||||
format = `${day} - ${month} - ${year}`;
|
||||
case 'gaps':
|
||||
format = `${day} - ${month} - ${year}`;
|
||||
break;
|
||||
default:
|
||||
default:
|
||||
format = `${day}/${month}/${year}`;
|
||||
}
|
||||
|
||||
this.setState({
|
||||
date: format
|
||||
this.setState({
|
||||
date: format
|
||||
});
|
||||
} else {
|
||||
// Full date
|
||||
@@ -60,8 +60,8 @@ export default class DateWidget extends React.PureComponent {
|
||||
const month = date.toLocaleDateString(lang, { month: 'long' });
|
||||
const year = date.getFullYear();
|
||||
|
||||
this.setState({
|
||||
date: `${day} ${nth} ${month} ${year}`
|
||||
this.setState({
|
||||
date: `${day} ${nth} ${month} ${year}`
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -73,4 +73,4 @@ export default class DateWidget extends React.PureComponent {
|
||||
render() {
|
||||
return <span style={{ 'textTransform': 'capitalize', 'fontWeight': 'bold' }}>{this.state.date}</span>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user