Update code formatting

This commit is contained in:
Thomas Nordquist
2019-06-15 14:56:57 +02:00
parent 6176859c7c
commit 92e045297e
115 changed files with 2988 additions and 1042 deletions

View File

@@ -18,7 +18,10 @@ const styles = (theme: Theme) => ({
color: orange[600],
},
icon: {
boxShadow: theme.shadows[2].split('),').map(s => `inset ${s}`).join('),'),
boxShadow: theme.shadows[2]
.split('),')
.map(s => `inset ${s}`)
.join('),'),
padding: '6px',
borderRadius: '50%',
backgroundColor: '#eee',

View File

@@ -37,9 +37,11 @@ class Copy extends React.Component<Props, State> {
}
public render() {
const icon = !this.state.didCopy
? <FileCopy fontSize="inherit" />
: <Check fontSize="inherit" style={{ cursor: 'default' }} />
const icon = !this.state.didCopy ? (
<FileCopy fontSize="inherit" />
) : (
<Check fontSize="inherit" style={{ cursor: 'default' }} />
)
return (
<span>
@@ -61,4 +63,7 @@ const mapDispatchToProps = (dispatch: any) => {
}
}
export default connect(undefined, mapDispatchToProps)(Copy)
export default connect(
undefined,
mapDispatchToProps
)(Copy)

View File

@@ -28,7 +28,9 @@ class DateFormatter extends React.Component<Props, {}> {
}
private localizedDate(locale: string) {
return moment(this.props.date).locale(locale).format('L LTS')
return moment(this.props.date)
.locale(locale)
.format('L LTS')
}
private unitForInterval(milliseconds: number) {

View File

@@ -6,7 +6,7 @@ export function isElementInViewport(el: any) {
return (
rect.top >= 0 &&
rect.left >= 0 &&
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && /*or $(window).height() */
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) /*or $(window).height() */ &&
rect.right <= (window.innerWidth || document.documentElement.clientWidth) /*or $(window).width() */
)
}