Update code formatting
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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() */
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user