Skip to content

Instantly share code, notes, and snippets.

@jsmanifest
Created June 9, 2020 15:01
Show Gist options
  • Save jsmanifest/bf780954f90aa5e9a7c3a365c518b6dc to your computer and use it in GitHub Desktop.
Save jsmanifest/bf780954f90aa5e9a7c3a365c518b6dc to your computer and use it in GitHub Desktop.
const getBaseStyles = () => ({ baseStyles: { color: '#333' } })
const baseStyles = getBaseStyles()
const injectContext = makeInjectContext({
baseStyles,
})
function resolveTimestampInjection(component) {
return function ({ displayTimestamp }) {
if (displayTimestamp === true) {
return {
time: new Date(currentDate).toLocaleTimeString(),
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment