Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export default function IdealImage(props: Props): ReactNode {

return (
<ReactIdealImage
style={propsRest.style}
Comment thread
slorber marked this conversation as resolved.
Resolved
height={img.src.height ?? 100}
width={img.src.width ?? 100}
placeholder={{lqip: img.preSrc}}
Expand Down
9 changes: 9 additions & 0 deletions website/_dogfooding/_pages tests/ideal-image.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
.logo {
display: flex;
}
22 changes: 22 additions & 0 deletions website/_dogfooding/_pages tests/ideal-image.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import Image from '@theme/IdealImage';

import styles from './ideal-image.module.css';

function Component() {
return (
<Image
className={styles.logo}
style={{width: '100px', height: '32px'}}
img={require('./img/oss_logo.png')}
/>
);
}
Comment thread
slorber marked this conversation as resolved.
Resolved

export default Component;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions website/_dogfooding/_pages tests/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ import Readme from "../README.mdx"
- [History tests](/tests/pages/history-tests)
- [Embeds](/tests/pages/embeds)
- [Style Isolation tests](/tests/pages/style-isolation)
- [IdealImage tests](/tests/pages/ideal-image)
Loading