-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(interface): add new
Image
interface
- Loading branch information
Showing
3 changed files
with
32 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* This interface is used to specify a path to an image, | ||
* along with related properties, like alt text. | ||
* @public | ||
*/ | ||
export interface Image { | ||
/** | ||
* The path to the image file. | ||
*/ | ||
src: string; | ||
|
||
/** | ||
* The alternative text of the image, used to improve accessibility. | ||
*/ | ||
alt: string; | ||
|
||
/** | ||
* The `loading` attribute of the image. | ||
* - `lazy` means that the image will be loaded only when it is in the viewport. | ||
* - `eager` means that the image will be loaded as soon as possible. | ||
*/ | ||
loading?: 'lazy' | 'eager'; | ||
} |
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