#REACT 我可以更改 cloudinary 图像上传社交媒体图标吗
#REACT can i change cloudinary image uploadar social media icons
在 React 中,我想更改 Cloudinary 上传小部件的社交媒体图标。目前,它只有一种颜色图标,但我想使用与(Facebook、google drive.. 等)的真实图标相同的图标
Check Image
目前没有为每个图标设置不同颜色的选项。但是,您可以通过设置 inactiveTabIcon
来更改图标的颜色。例如:
<script src="https://widget.cloudinary.com/v2.0/global/all.js" type="text/javascript"></script>
<button id="upload_widget" class="cloudinary-button">Upload files</button>
<script type="text/javascript">
var myWidget = cloudinary.createUploadWidget({
cloudName: '<cloud name>',
upload_preset: '<upload preset>',
styles: {
palette: {
window: "#CC7E7E",
windowBorder: "#90A0B3",
tabIcon: "#2C609A",
menuIcons: "#5A616A",
textDark: "#000000",
textLight: "#FFFFFF",
link: "#2C609A",
action: "#FF620C",
inactiveTabIcon: "#BF6958",
error: "#E83019",
inProgress: "#0078FF",
complete: "#299436",
sourceBg: "#BCC1C5"
}}
}, (error, result) => { if (result.event == "success") {
console.log(result.info) // result.info contains data from upload
} })
document.getElementById("upload_widget").addEventListener("click", function(){
myWidget.open();
}, false);
</script>
在 React 中,我想更改 Cloudinary 上传小部件的社交媒体图标。目前,它只有一种颜色图标,但我想使用与(Facebook、google drive.. 等)的真实图标相同的图标 Check Image
目前没有为每个图标设置不同颜色的选项。但是,您可以通过设置 inactiveTabIcon
来更改图标的颜色。例如:
<script src="https://widget.cloudinary.com/v2.0/global/all.js" type="text/javascript"></script>
<button id="upload_widget" class="cloudinary-button">Upload files</button>
<script type="text/javascript">
var myWidget = cloudinary.createUploadWidget({
cloudName: '<cloud name>',
upload_preset: '<upload preset>',
styles: {
palette: {
window: "#CC7E7E",
windowBorder: "#90A0B3",
tabIcon: "#2C609A",
menuIcons: "#5A616A",
textDark: "#000000",
textLight: "#FFFFFF",
link: "#2C609A",
action: "#FF620C",
inactiveTabIcon: "#BF6958",
error: "#E83019",
inProgress: "#0078FF",
complete: "#299436",
sourceBg: "#BCC1C5"
}}
}, (error, result) => { if (result.event == "success") {
console.log(result.info) // result.info contains data from upload
} })
document.getElementById("upload_widget").addEventListener("click", function(){
myWidget.open();
}, false);
</script>