Skip to content

Commit

Permalink
💄 tweak Upload showDownloadIcon default value
Browse files Browse the repository at this point in the history
it should be false
  • Loading branch information
afc163 committed Feb 21, 2020
1 parent 91a5947 commit 3774f36
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 541 deletions.
2 changes: 1 addition & 1 deletion components/upload/UploadList.tsx
Expand Up @@ -16,7 +16,7 @@ export default class UploadList extends React.Component<UploadListProps, any> {
showInfo: false,
},
showRemoveIcon: true,
showDownloadIcon: true,
showDownloadIcon: false,
showPreviewIcon: true,
previewFile: previewImage,
};
Expand Down
227 changes: 9 additions & 218 deletions components/upload/__tests__/__snapshots__/demo.test.js.snap
Expand Up @@ -64,7 +64,7 @@ exports[`renders ./components/upload/demo/defaultFileList.md correctly 1`] = `
</svg>
</i>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="http://www.baidu.com/xxx.png"
rel="noopener noreferrer"
target="_blank"
Expand All @@ -75,31 +75,6 @@ exports[`renders ./components/upload/demo/defaultFileList.md correctly 1`] = `
<span
class="ant-upload-list-item-card-actions "
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
<a
title="Remove file"
>
Expand Down Expand Up @@ -162,7 +137,7 @@ exports[`renders ./components/upload/demo/defaultFileList.md correctly 1`] = `
</svg>
</i>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="http://www.baidu.com/yyy.png"
rel="noopener noreferrer"
target="_blank"
Expand All @@ -173,31 +148,6 @@ exports[`renders ./components/upload/demo/defaultFileList.md correctly 1`] = `
<span
class="ant-upload-list-item-card-actions "
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
<a
title="Remove file"
>
Expand Down Expand Up @@ -369,7 +319,7 @@ exports[`renders ./components/upload/demo/fileList.md correctly 1`] = `
</svg>
</i>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="http://www.baidu.com/xxx.png"
rel="noopener noreferrer"
target="_blank"
Expand All @@ -380,31 +330,6 @@ exports[`renders ./components/upload/demo/fileList.md correctly 1`] = `
<span
class="ant-upload-list-item-card-actions "
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
<a
title="Remove file"
>
Expand Down Expand Up @@ -474,7 +399,7 @@ exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = `
/>
</a>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
rel="noopener noreferrer"
target="_blank"
Expand Down Expand Up @@ -513,27 +438,6 @@ exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = `
</svg>
</i>
</a>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
<i
aria-label="icon: delete"
class="anticon anticon-delete"
Expand Down Expand Up @@ -583,7 +487,7 @@ exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = `
/>
</a>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
rel="noopener noreferrer"
target="_blank"
Expand Down Expand Up @@ -622,27 +526,6 @@ exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = `
</svg>
</i>
</a>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
<i
aria-label="icon: delete"
class="anticon anticon-delete"
Expand Down Expand Up @@ -692,7 +575,7 @@ exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = `
/>
</a>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
rel="noopener noreferrer"
target="_blank"
Expand Down Expand Up @@ -731,27 +614,6 @@ exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = `
</svg>
</i>
</a>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
<i
aria-label="icon: delete"
class="anticon anticon-delete"
Expand Down Expand Up @@ -801,7 +663,7 @@ exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = `
/>
</a>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
rel="noopener noreferrer"
target="_blank"
Expand Down Expand Up @@ -840,27 +702,6 @@ exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = `
</svg>
</i>
</a>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
<i
aria-label="icon: delete"
class="anticon anticon-delete"
Expand Down Expand Up @@ -1036,7 +877,7 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
/>
</a>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
rel="noopener noreferrer"
target="_blank"
Expand All @@ -1047,31 +888,6 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
<span
class="ant-upload-list-item-card-actions picture"
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
<a
title="Remove file"
>
Expand Down Expand Up @@ -1225,7 +1041,7 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
/>
</a>
<a
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-2"
class="ant-upload-list-item-name ant-upload-list-item-name-icon-count-1"
href="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
rel="noopener noreferrer"
target="_blank"
Expand All @@ -1236,31 +1052,6 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
<span
class="ant-upload-list-item-card-actions picture"
>
<a
title="Download file"
>
<i
aria-label="icon: download"
class="anticon anticon-download"
tabindex="-1"
title="Download file"
>
<svg
aria-hidden="true"
class=""
data-icon="download"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"
/>
</svg>
</i>
</a>
<a
title="Remove file"
>
Expand Down

0 comments on commit 3774f36

Please sign in to comment.