mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 20:06:00 +00:00
search - better work with focus, unified component
This commit is contained in:
@@ -48,10 +48,22 @@ export function WidgetsInnerContainer({ children }) {
|
||||
// min-width: 90px;
|
||||
// `;
|
||||
|
||||
export const WidgetTitle = styled.div`
|
||||
const StyledWidgetTitle = styled.div`
|
||||
padding: 5px;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
background-color: gray;
|
||||
// background-color: #CEC;
|
||||
`;
|
||||
|
||||
export function WidgetTitle({ children, inputRef = undefined }) {
|
||||
return (
|
||||
<StyledWidgetTitle
|
||||
onClick={() => {
|
||||
if (inputRef && inputRef.current) inputRef.current.focus();
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</StyledWidgetTitle>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user