{"id":24837239,"url":"https://github.com/letieu/react-auto-height-image","last_synced_at":"2025-03-26T04:14:05.011Z","repository":{"id":61716891,"uuid":"554303185","full_name":"letieu/react-auto-height-image","owner":"letieu","description":"Avoid zero height when load image","archived":false,"fork":false,"pushed_at":"2022-10-19T16:19:08.000Z","size":7491,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-31T05:53:33.473Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/letieu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-19T15:29:33.000Z","updated_at":"2022-10-21T06:21:40.000Z","dependencies_parsed_at":"2022-10-20T14:47:19.686Z","dependency_job_id":null,"html_url":"https://github.com/letieu/react-auto-height-image","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letieu%2Freact-auto-height-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letieu%2Freact-auto-height-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letieu%2Freact-auto-height-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letieu%2Freact-auto-height-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/letieu","download_url":"https://codeload.github.com/letieu/react-auto-height-image/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245585813,"owners_count":20639671,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-31T05:53:40.091Z","updated_at":"2025-03-26T04:14:04.992Z","avatar_url":"https://github.com/letieu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-auto-height-image\nAvoid zero height when loading image\n\n[![demo](https://github.com/letieu/react-auto-height-image/blob/master/ezgif.com-gif-maker.gif \"demo\")](https://github.com/letieu/react-auto-height-image/blob/master/ezgif.com-gif-maker.gif \"demo\")\n\n**Example**: use my package on the **left** side\n\n## Install\n```bash\nyarn add react-auto-height-image\n#or\nnpm install react-auto-height-image\n```\n\n## Use\n\nUse with your loading component\n```jsx\n\u003cAutoHeightImage\n  src=\"https://i.picsum.photos/id/172/200/300.jpg\"\n  loadingComponent={\u003cLoadingComponent /\u003e}\n/\u003e\n```\n\nUse with fixed height\n```jsx\n\u003cAutoHeightImage\n  src=\"https://i.picsum.photos/id/172/200/300.jpg\"\n  defaultHeight=\"200px\"\n/\u003e\n```\n\n## Props\n```js\n\ninterface AutoHeightImageProps extends React.ImgHTMLAttributes\u003cHTMLImageElement\u003e {\n  loadingComponent?: React.ReactNode,\n  defaultHeight?: string,\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletieu%2Freact-auto-height-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fletieu%2Freact-auto-height-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletieu%2Freact-auto-height-image/lists"}