mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
dbeaver/pro#6118 (#3652)
* dbeaver/pro#6118 feat: show driver description as an item's title in new connection dialog * dbeaver/pro#6118 feat: show driver description as an item's title in new connection dialog --------- Co-authored-by: Daria Marutkina <125263541+dariamarutkina@users.noreply.github.com> Co-authored-by: Ainur <59531286+yagudin10@users.noreply.github.com>
This commit is contained in:
co-authored by
Daria Marutkina
Ainur
parent
cabacfb475
commit
0727974c64
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* CloudBeaver - Cloud Database Manager
|
||||
* Copyright (C) 2020-2024 DBeaver Corp and others
|
||||
* Copyright (C) 2020-2025 DBeaver Corp and others
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0.
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -13,13 +13,14 @@ import style from './ItemList.module.css';
|
||||
interface Props {
|
||||
onClick: () => void;
|
||||
className?: string;
|
||||
title?: string;
|
||||
}
|
||||
|
||||
export const ListItem: React.FC<React.PropsWithChildren<Props>> = function ListItem({ children, onClick, className }) {
|
||||
export const ListItem: React.FC<React.PropsWithChildren<Props>> = function ListItem({ children, onClick, className, title }) {
|
||||
const styles = useS(style);
|
||||
|
||||
return (
|
||||
<Clickable as="div" className={s(styles, { listItem: true }, className)} focusable onClick={onClick}>
|
||||
<Clickable as="div" title={title} className={s(styles, { listItem: true }, className)} focusable onClick={onClick}>
|
||||
{children}
|
||||
</Clickable>
|
||||
);
|
||||
|
||||
@@ -31,7 +31,7 @@ export const Driver = observer<Props>(function Driver({ driver, onSelect }) {
|
||||
const styles = useS(style);
|
||||
|
||||
return (
|
||||
<ListItem onClick={select}>
|
||||
<ListItem title={driver.description} onClick={select}>
|
||||
<ListItemIcon className={s(styles, { icon: true })}>
|
||||
<StaticImage icon={driver.icon} className={s(styles, { staticImage: true })} />
|
||||
{!driver.driverInstalled && (
|
||||
@@ -41,7 +41,7 @@ export const Driver = observer<Props>(function Driver({ driver, onSelect }) {
|
||||
)}
|
||||
</ListItemIcon>
|
||||
<ListItemName>{driver.name}</ListItemName>
|
||||
<ListItemDescription title={driver.description}>{driver.description}</ListItemDescription>
|
||||
<ListItemDescription>{driver.description}</ListItemDescription>
|
||||
</ListItem>
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user