-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(image): Add documentation for Image component - styleguide
- Loading branch information
1 parent
08fd462
commit c3b29a3
Showing
1 changed file
with
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
### Usage criteria | ||
|
||
* We recommend not to `resize/crop` images in the browser. | ||
* The width and height should be the same ratio as the natural width and height of the image. | ||
* Image optimization should be done BEFORE rendering. | ||
* You can use the `contentful API` to request an image of a certain size. | ||
* `rounded="circle"` requires a square image `(width == height)` in order to generate a perfect circle. | ||
* Non-square images will give a warning and will appear oval shaped. | ||
|
||
```jsx | ||
<Image src="image-example.jpg" rounded="corners" width={300} height={300} alt="Image of co-workers collaborating" /> | ||
``` |