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/apps/meteor/client/components/UserInfo/UserInfoAction.tsx

21 lines
623 B

import { Button, IconButton } from '@rocket.chat/fuselage';
import type { Keys as IconName } from '@rocket.chat/icons';
import type { ReactElement, ComponentProps } from 'react';
type UserInfoActionProps = {
icon: IconName;
} & ComponentProps<typeof Button>;
const UserInfoAction = ({ icon, label, title, ...props }: UserInfoActionProps): ReactElement => {
if (!label && icon && title) {
return <IconButton small secondary icon={icon} title={title} aria-label={title} {...props} mi={4} size={40} />;
}
return (
<Button icon={icon} {...props} mi={4}>
{label}
</Button>
);
};
export default UserInfoAction;