-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update next-image types and fix image imports (#15921)
Images are now imported as objects with a src attribute. Test Plan yarn ts
- Loading branch information
Showing
11 changed files
with
164 additions
and
128 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
js_modules/dagster-ui/packages/app-oss/custom-next-env.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* eslint-disable import/no-default-export */ | ||
/// <reference types="next" /> | ||
|
||
type StaticImageData = { | ||
src: string; | ||
height: number; | ||
width: number; | ||
placeholder?: string; | ||
}; | ||
|
||
declare module '*.svg' { | ||
const content: StaticImageData; | ||
export default content; | ||
} | ||
|
||
declare module '*.jpg' { | ||
const content: StaticImageData; | ||
export default content; | ||
} | ||
|
||
declare module '*.jpeg' { | ||
const content: StaticImageData; | ||
export default content; | ||
} | ||
|
||
declare module '*.gif' { | ||
const content: StaticImageData; | ||
export default content; | ||
} | ||
|
||
declare module '*.webp' { | ||
const content: StaticImageData; | ||
export default content; | ||
} | ||
|
||
declare module '*.ico' { | ||
const content: StaticImageData; | ||
export default content; | ||
} | ||
|
||
declare module '*.bmp' { | ||
const content: StaticImageData; | ||
export default content; | ||
} | ||
|
||
declare module '*.avif' { | ||
const content: StaticImageData; | ||
export default content; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 0 additions & 72 deletions
72
js_modules/dagster-ui/packages/app-oss/src/react-app-env.d.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
js_modules/dagster-ui/packages/ui-components/custom-next-env.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* eslint-disable import/no-default-export */ | ||
/// <reference types="next" /> | ||
|
||
type StaticImageData = { | ||
src: string; | ||
height: number; | ||
width: number; | ||
placeholder?: string; | ||
}; | ||
|
||
declare module '*.svg' { | ||
const content: StaticImageData; | ||
export default content; | ||
} | ||
|
||
declare module '*.jpg' { | ||
const content: StaticImageData; | ||
export default content; | ||
} | ||
|
||
declare module '*.jpeg' { | ||
const content: StaticImageData; | ||
export default content; | ||
} | ||
|
||
declare module '*.gif' { | ||
const content: StaticImageData; | ||
export default content; | ||
} | ||
|
||
declare module '*.webp' { | ||
const content: StaticImageData; | ||
export default content; | ||
} | ||
|
||
declare module '*.ico' { | ||
const content: StaticImageData; | ||
export default content; | ||
} | ||
|
||
declare module '*.bmp' { | ||
const content: StaticImageData; | ||
export default content; | ||
} | ||
|
||
declare module '*.avif' { | ||
const content: StaticImageData; | ||
export default content; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
js_modules/dagster-ui/packages/ui-components/src/types/svg.d.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
47735b7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for dagit-storybook ready!
✅ Preview
https://dagit-storybook-2j400z4ra-elementl.vercel.app
Built with commit 47735b7.
This pull request is being automatically deployed with vercel-action
47735b7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for dagit-core-storybook ready!
✅ Preview
https://dagit-core-storybook-q0b6hhjc1-elementl.vercel.app
Built with commit 47735b7.
This pull request is being automatically deployed with vercel-action