Select to view content in your preferred language

Change the icon picture of elements in Experience Builder

90
0
Monday
JasonBOCQUET
Frequent Contributor

Hi community,

I  want to change the icon to allow the possibility to export data :  

JasonBOCQUET_0-1759741249431.png(this one)

I tried to create a custom widget and force the CSS to change the icon 

 

So in a widget.tsx file i write this code :

/** widget.tsx */
import { React, jsx } from 'jimu-core';
import './style.scss';

export default function Widget() {
  return null; // ce widget n'affiche rien, il sert juste à injecter le style
}

and use a scss file to use my picture :

/* style.scss */


.data-action-button svg {
  display: none !important; 
}

.data-action-button::before {
  content: '';
  display: inline-block;
  width: 16px;  
  height: 16px;
  background: url('icon.svg') no-repeat center center;
  background-size: contain;
}

the 

JasonBOCQUET_1-1759741406929.png

icon dissapear but my new image doesn't appears. I don't understand what I miss.

 

If anyone can help me ? 

0 Kudos
0 Replies