Skip to content

Commit

Permalink
chore: Update placeholder images in stories and demos (#9395)
Browse files Browse the repository at this point in the history
**Related Issue:** #9361 , #9392 

## Summary
Removes served images from stories and local demo. We keep them in `.md`
file, as these need to be hosted somewhere in order to work if the
samples are used in an external location. cc @driskull

Ideally, we could use map tiles or something
(https://codepen.io/mac_and_cheese/pen/XWwXXqx?editors=1000) for these,
but not sure how reliable those are.
  • Loading branch information
macandcheese authored May 22, 2024
1 parent 4e23c10 commit d294d1d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { select, number, text } from "../../../.storybook/fake-knobs";
import { modesDarkDefault } from "../../../.storybook/utils";
import { html } from "../../../support/formatting";
import { boolean } from "../../../.storybook/helpers";
import { placeholderImage } from "../../../.storybook/placeholderImage";

export default {
title: "Components/Carousel",
Expand Down Expand Up @@ -59,7 +60,7 @@ export const carouselAutoplayFullImageWithOverlayAndEdge = (): string =>
<style>
.bg-image-example {
color: red;
background-image: url("https://placebear.com/3000/2000");
background-image: url("${placeholderImage({ width: 3000, height: 2000 })}");
background-size: cover;
padding: 1rem;
height: 300px;
Expand Down Expand Up @@ -89,7 +90,7 @@ export const carouselAutoplayFullImageWithNoOverlay = (): string =>
<style>
.bg-image-example {
color: red;
background-image: url("https://placebear.com/3000/2000");
background-image: url("${placeholderImage({ width: 3000, height: 2000 })}");
background-size: cover;
padding: 1rem;
height: 300px;
Expand Down Expand Up @@ -119,7 +120,7 @@ export const carouselFullImageWithOverlay = (): string =>
<style>
.bg-image-example {
color: red;
background-image: url("https://placebear.com/3000/2000");
background-image: url("${placeholderImage({ width: 3000, height: 2000 })}");
background-size: cover;
padding: 1rem;
height: 300px;
Expand Down Expand Up @@ -203,7 +204,7 @@ export const themed_simple = (): string =>
<style>
.bg-image-example {
color: red;
background-image: url("https://placebear.com/3000/2000");
background-image: url("${placeholderImage({ width: 3000, height: 2000 })}");
background-size: cover;
padding: 1rem;
height: 300px;
Expand Down Expand Up @@ -264,7 +265,7 @@ export const themed_carouselFullImageWithOverlay = (): string =>
<style>
.bg-image-example {
color: red;
background-image: url("https://placebear.com/3000/2000");
background-image: url("${placeholderImage({ width: 3000, height: 2000 })}");
background-size: cover;
padding: 1rem;
height: 300px;
Expand Down
8 changes: 4 additions & 4 deletions packages/calcite-components/src/custom-theme.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@ export const themingInteractive = (): string => {
<div class="demo-column">
<calcite-accordion>
<calcite-accordion-item heading="Accordion Item"
><img src="https://placem.at/places?w=200&txt=0" />
><img src="${placeholderImage({ width: 300, height: 200 })}" />
</calcite-accordion-item>
<calcite-accordion-item heading="Accordion Item 2"
><img src="https://placem.at/places?w=200&txt=0" />
><img src="${placeholderImage({ width: 300, height: 200 })}" />
</calcite-accordion-item>
<calcite-accordion-item heading="Accordion Item 3"
><img src="https://placem.at/places?w=200&txt=0" />
><img src="${placeholderImage({ width: 300, height: 200 })}" />
</calcite-accordion-item>
<calcite-accordion-item heading="Accordion Item 4"
><img src="https://placem.at/places?w=200&txt=0" />
><img src="${placeholderImage({ width: 300, height: 200 })}" />
</calcite-accordion-item>
<calcite-accordion-item heading="Accordion Item 5" expanded>
<calcite-tree lines>
Expand Down
4 changes: 2 additions & 2 deletions packages/calcite-components/src/demos/carousel.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@
}

.bg-image-example {
background-image: url("https://placebear.com/3000/2000");
background-image: url("./_assets/images/placeholder.svg");
background-size: cover;
padding: 1.5rem 3rem;
height: 300px;
margin: 0;
font-size: 32px;
color: white;
color: red;
font-weight: 600;
line-height: 32px;
}
Expand Down

0 comments on commit d294d1d

Please sign in to comment.