这是indexloc提供的服务,不要输入任何密码
Skip to content

docs: Add dark/light mode aware ThemedImage and ThemedImageFigure #1604

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 1, 2022

Conversation

jaredpalmer
Copy link
Contributor

@jaredpalmer jaredpalmer commented Jul 30, 2022

Added some image utils for us. `

The one that's useful is ThemedImageFigure which gives use light/dark mode images and nice captions on blog posts. There is a also a plain ThemedImage that simple dark/light mode aware.

<ThemedImageFigure 
  borderRadius={true}
  dark={{
    source: '/images/blog/turbo-1-1-0/dark.png?,
    height: 600,
    width: 1200
  }}
  light={{
    source: '/images/blog/turbo-1-1-0/light.png',
    height: 600,
    width: 1200
  }}
  caption="This is a caption"
/>

CleanShot 2022-07-30 at 13 48 30@2x

CleanShot 2022-07-30 at 13 48 39@2x

@vercel
Copy link

vercel bot commented Jul 30, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
turbo-site ⬜️ Ignored (Inspect) Sep 1, 2022 at 5:05PM (UTC)

@jaredpalmer jaredpalmer changed the title Add dark/light mode aware Image and ThemedFigure Add dark/light mode aware ThemedImage and ThemedImageFigure Jul 30, 2022
@jaredpalmer jaredpalmer changed the title Add dark/light mode aware ThemedImage and ThemedImageFigure docs: Add dark/light mode aware ThemedImage and ThemedImageFigure Jul 30, 2022
@tknickman tknickman added the pr: fixship A PR which is approved with notes and does not require re-review. label Aug 1, 2022
Copy link
Member

@tknickman tknickman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, minor comment that's not required for merge.

@tknickman tknickman added pr: automerge Kodiak will merge these automatically after checks pass and removed pr: fixship A PR which is approved with notes and does not require re-review. labels Aug 1, 2022
@kodiakhq kodiakhq bot merged commit ad846d4 into main Aug 1, 2022
@kodiakhq kodiakhq bot deleted the jp/themed-image branch August 1, 2022 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: automerge Kodiak will merge these automatically after checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants