mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-05 22:38:48 +00:00
Fix: OnClick doesn't fire event on SVG icons of Datasource manager modal (#1933)
* Fixed: click event didn't work on svg * Fixed: list items' height problem * changed CardIcon component to a function
This commit is contained in:
parent
046743eab7
commit
34a1aeee2d
2 changed files with 6 additions and 2 deletions
|
|
@ -184,6 +184,10 @@
|
|||
border-radius: 4px!important;
|
||||
background-color: $primary!important;
|
||||
}
|
||||
|
||||
.list-group-item + .list-group-item.active {
|
||||
margin-top: 0px!important;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-body-content {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||
import { allSvgs } from '@tooljet/plugins/client';
|
||||
|
||||
const Card = ({ title, src, handleClick, height = 50, width = 50, usepluginIcon = false }) => {
|
||||
const CardIcon = ({ src, height, width }) => {
|
||||
const displayIcon = (src) => {
|
||||
if (usepluginIcon) {
|
||||
const Icon = allSvgs[src];
|
||||
return <Icon style={{ height, width }} />;
|
||||
|
|
@ -23,7 +23,7 @@ const Card = ({ title, src, handleClick, height = 50, width = 50, usepluginIcon
|
|||
>
|
||||
<div className="card-body">
|
||||
<center>
|
||||
<CardIcon src={src} height={height} width={width} />
|
||||
{displayIcon(src)}
|
||||
<br></br>
|
||||
<br></br>
|
||||
<span>{title}</span>
|
||||
|
|
|
|||
Loading…
Reference in a new issue