This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @jsx jsx */ | |
import { jsx, useColorMode } from "theme-ui" | |
import { buildImageObj } from '../../lib/helpers' | |
import { imageUrlFor } from '../../lib/image-url' | |
function DarkModeImage (props) { | |
const [colorMode] = useColorMode() | |
const SanityImageToggle = (colorMode == 'light') ? props.primaryImage : props.darkmodeImage | |
return ( | |
<figure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { getFluidGatsbyImage } from 'gatsby-source-sanity' | |
import Img from 'gatsby-image' | |
import { buildImageObj } from '../../lib/helpers' | |
import { imageUrlFor } from '../../lib/image-url' | |
import clientConfig from '../../../client-config' | |
function Figure(props) { | |
const data = props |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default { | |
name: "figure", | |
title: "Image", | |
type: "image", | |
options: { | |
hotspot: true, | |
}, | |
fields: [ | |
{ | |
title: "Caption", |
NewerOlder