-
-
Notifications
You must be signed in to change notification settings - Fork 2k
feat(image): add loading src to display loading state #4783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Arian94
wants to merge
24
commits into
heroui-inc:canary
Choose a base branch
from
Arian94:feat/image-loading-state_3640
base: canary
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
ba8eeb3
feat(image): add loading src to display loading state
33053b4
fix(image): fix sb issues
d763e24
test(image): add two cases (second test is not complete)
2eb1421
Merge branch 'heroui-inc:canary' into feat/image-loading-state_3640
Arian94 654dcf3
test(image): rectify the 2 tests regarding loading and fallback states
Arian94 de08d98
test(image): improve tests (cleanup renders)
Arian94 ef99401
test(image): add coderabbitai suggestions
Arian94 e48417c
Merge branch 'canary' into pr/4783
wingkwong b9dbaf0
Merge branch 'canary' into pr/4783
wingkwong 1f37a3e
fix(docs): fix reported issues
Arian94 0146586
feat(image): add loadingImg and fallbackImg in classNames prop
Arian94 7da3d55
test(image): add tests for loadingImg and fallbackImg classNames
Arian94 96158c0
fix(use-image): merge wrapper styles with loading and fallback styles
Arian94 7856014
test(image.test): change tests for loading and fallback cases
Arian94 a409f6f
docs(image): update docs to include loading and fallback styles
Arian94 e192e93
fix(use-image): res conf
Arian94 62fdc74
fix: review issues
Arian94 2196ef0
docs: add changeset
Arian94 e3fbbda
docs: rectify changeset
Arian94 02252a1
fix: fix customLoading loading style - add classNames to mdx
Arian94 770bd53
fix(image.mdx): fix typo
Arian94 c9a3df6
fix(image.test): impl ai recom
Arian94 670b269
fix(image.test): fix ai-reported bug
Arian94 b0cf753
fix(image.test): fix func naming
Arian94 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,13 @@ | ||
| import {Image} from "@nextui-org/react"; | ||
|
|
||
| export default function App() { | ||
| return ( | ||
| <Image | ||
| alt="NextUI Image with custom loading" | ||
| height={200} | ||
| loadingSrc="https://via.placeholder.com/300x200" | ||
| src="https://app.requestly.io/delay/1000/https://nextui-docs-v2.vercel.app/images/fruit-4.jpeg" | ||
| width={300} | ||
| /> | ||
| ); | ||
| } | ||
This file contains hidden or 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,9 @@ | ||
| import App from "./customLoading.raw.jsx?raw"; | ||
|
|
||
| const react = { | ||
| "/App.jsx": App, | ||
| }; | ||
|
|
||
| export default { | ||
| ...react, | ||
| }; |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.