The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/client/lib/clickableItem.js

22 lines
596 B

import { css } from '@rocket.chat/css-in-js';
import colors from '@rocket.chat/fuselage-tokens/colors';
import React from 'react';
const clickable = css`
cursor: pointer;
border-bottom: 2px solid ${colors.n300} !important;
&:hover,
&:focus {
background: ${colors.n100};
}
`;
// TODO remove border from here
export function clickableItem(Component) {
const WrappedComponent = (props) => <Component className={clickable} tabIndex={0} {...props} />;
WrappedComponent.displayName = `clickableItem(${Component.displayName ?? Component.name ?? 'Component'})`;
return WrappedComponent;
}