search - better work with focus, unified component

This commit is contained in:
Jan Prochazka
2020-05-10 21:27:07 +02:00
parent 125ba3b0c8
commit 8f5467859b
6 changed files with 35 additions and 10 deletions

View File

@@ -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>
);
}