Skip to content

Commit

Permalink
fix(layout): use img height
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Oct 14, 2022
1 parent 8eb4545 commit 224b573
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const defaultRenderLogo = (
logo: React.ReactNode | (() => React.ReactNode),
): React.ReactNode => {
if (typeof logo === 'string') {
return <img width={22} src={logo} alt="logo" />;
return <img width="auto" height={22} src={logo} alt="logo" />;
}
if (typeof logo === 'function') {
return logo();
Expand Down
3 changes: 2 additions & 1 deletion tests/layout/__snapshots__/demo.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -15815,8 +15815,9 @@ exports[`layout demos 📸 renders ./packages/layout/src/demos/customizeMenu.tsx
>
<img
alt="logo"
height="22"
src="https://gw.alipayobjects.com/mdn/rms_b5fcc5/afts/img/A*1NHAQYduQiQAAAAAAAAAAABkARQnAQ"
width="22"
width="auto"
/>
<h1>
Remax
Expand Down

0 comments on commit 224b573

Please sign in to comment.