diff --git a/docs/src/docs/theming/theme-object.mdx b/docs/src/docs/theming/theme-object.mdx index 5a9544bfd1c..da830918259 100644 --- a/docs/src/docs/theming/theme-object.mdx +++ b/docs/src/docs/theming/theme-object.mdx @@ -259,7 +259,7 @@ Note that you should also import `dayjs/locale/[locale]` to load localization fi ### globalStyles -`theme.globalStyles` adds global styles, see [global styles guide](/styles/global/) to learn more. +`theme.globalStyles` adds global styles, see [global styles guide](/styles/global-styles/) to learn more. ### other diff --git a/src/mantine-core/src/Image/Image.story.tsx b/src/mantine-core/src/Image/Image.story.tsx index deaba0bc23f..10710cd6216 100644 --- a/src/mantine-core/src/Image/Image.story.tsx +++ b/src/mantine-core/src/Image/Image.story.tsx @@ -1,8 +1,10 @@ import React, { useEffect, useState } from 'react'; import { storiesOf } from '@storybook/react'; import { useInterval } from '@mantine/hooks'; +import { MantineProvider } from '@mantine/styles'; import { Container } from '../Container'; import { Image } from './Image'; +import { AspectRatio } from '../AspectRatio'; const images = [ 'https://images.unsplash.com/photo-1470071459604-3b5ec3a7fe05?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=3748&q=80', @@ -36,4 +38,18 @@ storiesOf('Image', module) + )) + .add('Responsive Image with AspectRatio', () => ( + +
+

Responsive Image with AspectRatio

+ + + +

Responsive Placeholder with AspectRatio

+ + + +
+
)); diff --git a/src/mantine-core/src/Image/Image.tsx b/src/mantine-core/src/Image/Image.tsx index 89e06cf24e0..fc789681920 100644 --- a/src/mantine-core/src/Image/Image.tsx +++ b/src/mantine-core/src/Image/Image.tsx @@ -115,7 +115,11 @@ export const Image = forwardRef((props: ImageProps, {isPlaceholder && (
- {placeholder || } + {placeholder || ( +
+ +
+ )}
)}