Skip to content

Commit

Permalink
feat: (ErrorBlock) add --image-width --image-width-full-page
Browse files Browse the repository at this point in the history
  • Loading branch information
awmleer committed Oct 20, 2021
1 parent d43c3ee commit 1103d44
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/components/error-block/error-block.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@
--color: var(--adm-color-text);
--image-height: 100px;
--image-height-full-page: 200px;
--image-width: auto;
--image-width-full-page: auto;

box-sizing: border-box;
text-align: center;

&-image {
height: var(--image-height);
width: var(--image-width);
max-width: 100%;

& img {
height: 100%;
Expand Down Expand Up @@ -36,6 +41,7 @@
padding-top: calc(50vh - var(--image-height-full-page));
.@{class-prefix-error-block}-image {
height: var(--image-height-full-page);
width: var(--image-width-full-page);
}
.@{class-prefix-error-block}-description {
margin-top: 20px;
Expand Down
4 changes: 3 additions & 1 deletion src/components/error-block/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@

| Name | Description | Default |
| ------------------------ | -------------------------------------- | ------- |
| --image-height | Height of the image. | `100px` |
| --image-height | Height of the image | `100px` |
| --image-height-full-page | Height of the image in `fullPage` mode | `200px` |
| --image-width | Width of the image | `auto` |
| --image-width-full-page | Width of the image in `fullPage` mode | `auto` |
2 changes: 2 additions & 0 deletions src/components/error-block/index.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@
| ------------------------ | -------------------- | ------- |
| --image-height | 图片的高度 | `100px` |
| --image-height-full-page | 整页模式下的图片高度 | `200px` |
| --image-width | 图片的宽度 | `auto` |
| --image-width-full-page | 整页模式下的图片宽度 | `auto` |

0 comments on commit 1103d44

Please sign in to comment.