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/views/teams/CreateTeamModal/TeamNameInput.tsx

14 lines
531 B

import { Icon, TextInput, TextInputProps } from '@rocket.chat/fuselage';
import React, { forwardRef, useMemo } from 'react';
type TeamNameInputProps = TextInputProps & {
private: boolean;
};
const TeamNameInput = forwardRef<HTMLInputElement, TeamNameInputProps>(function TeamNameInput({ private: _private = true, ...props }, ref) {
const addon = useMemo(() => <Icon name={_private ? 'team-lock' : 'team'} size='x20' />, [_private]);
return <TextInput ref={ref} {...props} addon={addon} />;
});
export default TeamNameInput;