site/components/signatures.js
zach latta 6fdecc4b42 Announcing Elon's 2021 gift! (#217)
* elon 2: relon (elonger)

* better social card

* Update copy and date

Co-authored-by: Zachary Fogg <me@zfo.gg>
2021-10-08 11:49:06 -04:00

18 lines
482 B
JavaScript

import { Image, useColorMode } from 'theme-ui'
const Signatures = ({fileName, width}) => {
// enforce a sane color mode (typescript should do this in the future)
let [colorMode] = useColorMode()
colorMode = colorMode === 'dark' ? 'light' : 'dark'
return (
<Image
src={`/signatures/${fileName}-${colorMode}.png`.toLowerCase()}
width={width || 96}
alt={`${fileName}'s signature`}
sx={{ '+ p': { mt: 0 } }}
/>
)
}
export default Signatures