Skip to content

Commit

Permalink
docs: fix image URLs for stories (#452)
Browse files Browse the repository at this point in the history
  • Loading branch information
lyndonbuckley authored Jul 26, 2024
1 parent a010e43 commit 935f4e5
Show file tree
Hide file tree
Showing 16 changed files with 102 additions and 102 deletions.
2 changes: 1 addition & 1 deletion src/Avatar/Avatar.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default {
},
args: {
innerClassName: 'rounded',
src: 'https://daisyui.com/images/stock/photo-1534528741775-53994a69daeb.jpg',
src: 'https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp',
},
} as Meta

Expand Down
2 changes: 1 addition & 1 deletion src/Button/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export const Glass: Story<ButtonProps> = (args) => {
className="w-full flex justify-center py-8 rounded-md"
style={{
backgroundImage:
'url(https://daisyui.com/images/stock/photo-1507358522600-9f71e620c44e.jpg)',
'url(https://img.daisyui.com/images/stock/photo-1507358522600-9f71e620c44e.webp)',
}}
>
<Button {...args}>Glass button</Button>
Expand Down
8 changes: 4 additions & 4 deletions src/Card/Card.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const Default: Story<CardProps> = (args) => {
return (
<Card {...args}>
<Card.Image
src="https://daisyui.com/images/stock/photo-1606107557195-0e29a4b5b4aa.jpg"
src="https://img.daisyui.com/images/stock/photo-1606107557195-0e29a4b5b4aa.webp"
alt="Shoes"
/>
<Card.Body>
Expand All @@ -35,7 +35,7 @@ export const Responsive: Story<CardProps> = (args) => {
</div>
<Card {...args} side="lg">
<Card.Image
src="https://daisyui.com/images/stock/photo-1606107557195-0e29a4b5b4aa.jpg"
src="https://img.daisyui.com/images/stock/photo-1606107557195-0e29a4b5b4aa.webp"
alt="Shoes"
/>
<Card.Body>
Expand All @@ -54,7 +54,7 @@ export const Centered: Story<CardProps> = (args) => {
return (
<Card {...args}>
<Card.Image
src="https://daisyui.com/images/stock/photo-1606107557195-0e29a4b5b4aa.jpg"
src="https://img.daisyui.com/images/stock/photo-1606107557195-0e29a4b5b4aa.webp"
alt="Shoes"
/>
<Card.Body className="items-center text-center">
Expand All @@ -72,7 +72,7 @@ export const ImageOverlay: Story<CardProps> = (args) => {
return (
<Card {...args} imageFull>
<Card.Image
src="https://daisyui.com/images/stock/photo-1606107557195-0e29a4b5b4aa.jpg"
src="https://img.daisyui.com/images/stock/photo-1606107557195-0e29a4b5b4aa.webp"
alt="Shoes"
/>
<Card.Body>
Expand Down
4 changes: 2 additions & 2 deletions src/Card/Card.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ describe('Card', () => {
})

it('Should render CardImage component', () => {
render(<Card.Image src="http://xyz/images/pic-1.jpg" alt="test image" />)
render(<Card.Image src="http://xyz/images/pic-1.webp" alt="test image" />)
const figureElement = screen.getByRole('figure')
expect(figureElement).toBeInTheDocument()
const imgElement = screen.getByRole('img') as HTMLImageElement
expect(imgElement).toBeInTheDocument()
expect(imgElement.src).toBe('http://xyz/images/pic-1.jpg')
expect(imgElement.src).toBe('http://xyz/images/pic-1.webp')
expect(imgElement.alt).toBe('test image')
})
})
94 changes: 47 additions & 47 deletions src/Carousel/Carousel.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,31 @@ export const Default: Story<CarouselProps> = (args) => {
return (
<Carousel {...args} className="rounded-box">
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.jpg"
src="https://img.daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.jpg"
src="https://img.daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.jpg"
src="https://img.daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1494253109108-2e30c049369b.jpg"
src="https://img.daisyui.com/images/stock/photo-1494253109108-2e30c049369b.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.jpg"
src="https://img.daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1559181567-c3190ca9959b.jpg"
src="https://img.daisyui.com/images/stock/photo-1559181567-c3190ca9959b.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.jpg"
src="https://img.daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.webp"
alt="Fruits"
/>
</Carousel>
Expand All @@ -49,31 +49,31 @@ export const Snap: Story<CarouselProps> = (args) => {
return (
<Carousel {...args} className="rounded-box">
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.jpg"
src="https://img.daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.jpg"
src="https://img.daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.jpg"
src="https://img.daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1494253109108-2e30c049369b.jpg"
src="https://img.daisyui.com/images/stock/photo-1494253109108-2e30c049369b.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.jpg"
src="https://img.daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1559181567-c3190ca9959b.jpg"
src="https://img.daisyui.com/images/stock/photo-1559181567-c3190ca9959b.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.jpg"
src="https://img.daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.webp"
alt="Fruits"
/>
</Carousel>
Expand All @@ -87,31 +87,31 @@ export const FullWidth: Story<CarouselProps> = (args) => {
return (
<Carousel {...args} className="w-64 rounded-box">
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.jpg"
src="https://img.daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.jpg"
src="https://img.daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.jpg"
src="https://img.daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1494253109108-2e30c049369b.jpg"
src="https://img.daisyui.com/images/stock/photo-1494253109108-2e30c049369b.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.jpg"
src="https://img.daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1559181567-c3190ca9959b.jpg"
src="https://img.daisyui.com/images/stock/photo-1559181567-c3190ca9959b.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.jpg"
src="https://img.daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.webp"
alt="Fruits"
/>
</Carousel>
Expand All @@ -125,31 +125,31 @@ export const HalfWidth: Story<CarouselProps> = (args) => {
return (
<Carousel {...args} className="w-64 rounded-box">
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.jpg"
src="https://img.daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.jpg"
src="https://img.daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.jpg"
src="https://img.daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1494253109108-2e30c049369b.jpg"
src="https://img.daisyui.com/images/stock/photo-1494253109108-2e30c049369b.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.jpg"
src="https://img.daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1559181567-c3190ca9959b.jpg"
src="https://img.daisyui.com/images/stock/photo-1559181567-c3190ca9959b.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.jpg"
src="https://img.daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.webp"
alt="Fruits"
/>
</Carousel>
Expand All @@ -163,31 +163,31 @@ export const Vertical: Story<CarouselProps> = (args) => {
return (
<Carousel {...args} className="h-96 w-64 rounded-box">
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.jpg"
src="https://img.daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.jpg"
src="https://img.daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.jpg"
src="https://img.daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1494253109108-2e30c049369b.jpg"
src="https://img.daisyui.com/images/stock/photo-1494253109108-2e30c049369b.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.jpg"
src="https://img.daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1559181567-c3190ca9959b.jpg"
src="https://img.daisyui.com/images/stock/photo-1559181567-c3190ca9959b.webp"
alt="Fruits"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.jpg"
src="https://img.daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.webp"
alt="Fruits"
/>
</Carousel>
Expand All @@ -202,19 +202,19 @@ export const Numbered: Story<CarouselProps> = (args) => {
return (
<Carousel {...args} className="rounded-box">
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1625726411847-8cbb60cc71e6.jpg"
src="https://img.daisyui.com/images/stock/photo-1625726411847-8cbb60cc71e6.webp"
alt="City"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1609621838510-5ad474b7d25d.jpg"
src="https://img.daisyui.com/images/stock/photo-1609621838510-5ad474b7d25d.webp"
alt="City"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1414694762283-acccc27bca85.jpg"
src="https://img.daisyui.com/images/stock/photo-1414694762283-acccc27bca85.webp"
alt="City"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1665553365602-b2fb8e5d1707.jpg"
src="https://img.daisyui.com/images/stock/photo-1665553365602-b2fb8e5d1707.webp"
alt="City"
/>
</Carousel>
Expand All @@ -228,19 +228,19 @@ export const Sequential: Story<CarouselProps> = (args) => {
return (
<Carousel {...args} className="rounded-box">
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1625726411847-8cbb60cc71e6.jpg"
src="https://img.daisyui.com/images/stock/photo-1625726411847-8cbb60cc71e6.webp"
alt="City"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1609621838510-5ad474b7d25d.jpg"
src="https://img.daisyui.com/images/stock/photo-1609621838510-5ad474b7d25d.webp"
alt="City"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1414694762283-acccc27bca85.jpg"
src="https://img.daisyui.com/images/stock/photo-1414694762283-acccc27bca85.webp"
alt="City"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1665553365602-b2fb8e5d1707.jpg"
src="https://img.daisyui.com/images/stock/photo-1665553365602-b2fb8e5d1707.webp"
alt="City"
/>
</Carousel>
Expand All @@ -260,19 +260,19 @@ export const CustomButton: Story<CarouselProps> = (args) => {
return (
<Carousel {...args} className="rounded-box">
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1625726411847-8cbb60cc71e6.jpg"
src="https://img.daisyui.com/images/stock/photo-1625726411847-8cbb60cc71e6.webp"
alt="City"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1609621838510-5ad474b7d25d.jpg"
src="https://img.daisyui.com/images/stock/photo-1609621838510-5ad474b7d25d.webp"
alt="City"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1414694762283-acccc27bca85.jpg"
src="https://img.daisyui.com/images/stock/photo-1414694762283-acccc27bca85.webp"
alt="City"
/>
<Carousel.Item
src="https://daisyui.com/images/stock/photo-1665553365602-b2fb8e5d1707.jpg"
src="https://img.daisyui.com/images/stock/photo-1665553365602-b2fb8e5d1707.webp"
alt="City"
/>
</Carousel>
Expand Down
6 changes: 3 additions & 3 deletions src/Carousel/Carousel.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ const children = [
<Carousel.Item
key="1"
id="slide1"
src="http://xyz/images/pic-1.jpg"
src="http://xyz/images/pic-1.webp"
alt="Pic-1"
/>,
<Carousel.Item
key="2"
id="slide2"
src="http://xyz/images/pic-2.jpg"
src="http://xyz/images/pic-2.webp"
alt="Pic-2"
/>,
<Carousel.Item
key="3"
id="slide3"
src="http://xyz/images/pic-3.jpg"
src="http://xyz/images/pic-3.webp"
alt="Pic-3"
/>,
]
Expand Down
Loading

0 comments on commit 935f4e5

Please sign in to comment.