-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
147 additions
and
126 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
declare module '*.png'; | ||
declare module '*.svg'; | ||
declare module '*.jpeg'; | ||
declare module '*.jpg'; | ||
declare module '*.webp'; |
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
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,12 @@ | ||
/** | ||
* CSS files with the .module.css suffix will be treated as CSS modules | ||
* and scoped locally. | ||
*/ | ||
.codeEditor{ | ||
height: 100%; | ||
width: 100%; | ||
min-width: 300px; | ||
min-height: 120px; | ||
resize: none; | ||
justify-content: center; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,25 @@ | ||
interface PlaygroundPreviewProps { | ||
responseData: { | ||
imageUrl: string; | ||
errorMessage: string; | ||
}; | ||
imageUrl?: string; | ||
errorMessage?: string; | ||
} | ||
|
||
function PlaygroundPreview({ responseData }: PlaygroundPreviewProps): JSX.Element { | ||
if (responseData.errorMessage) { | ||
return <div>{responseData.errorMessage}</div>; | ||
} | ||
if (responseData.imageUrl) { | ||
function PlaygroundPreview({ imageUrl, errorMessage }: PlaygroundPreviewProps) { | ||
if (errorMessage) { | ||
return <div>{errorMessage}</div>; | ||
} else if (imageUrl) { | ||
return ( | ||
<img | ||
src={responseData.imageUrl} | ||
src={imageUrl} | ||
style={{ | ||
objectFit: 'contain', | ||
height: '100%', | ||
width: '100%', | ||
}} | ||
/> | ||
); | ||
} else { | ||
return null; | ||
} | ||
return null; | ||
} | ||
|
||
export default PlaygroundPreview; |
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
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.