Skip to content

Commit

Permalink
Remove tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-parker committed Jul 29, 2024
1 parent c9ca27b commit f555ecc
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions website/src/components/User/GroupCreationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,32 +150,16 @@ type LabelledInputContainerProps = PropsWithChildren<{
htmlFor: string;
className: string;
required?: boolean;
showInstitutionInfo?: boolean;
}>;

const LabelledInputContainer: FC<LabelledInputContainerProps> = ({
children,
label,
htmlFor,
className,
required,
showInstitutionInfo,
}) => {
const LabelledInputContainer: FC<LabelledInputContainerProps> = ({ children, label, htmlFor, className, required }) => {
return (
<div className={className}>
<div>
<label htmlFor={htmlFor} className='block text-sm font-medium leading-6 text-gray-900'>
{label}
{required === true && <span className='ml-1 text-red-600'>*</span>}
</label>
{showInstitutionInfo !== undefined && showInstitutionInfo && (
<Tooltip
id='institution-tooltip'
content={
'When submitting sequences on your behalf to INSDC your institution will be used as your INSDC "center name". This identifier will facilitate the recognition and attribution of your sequences within the INSDC.'
}
/>
)}
<div className='mt-1'>{children}</div>
</div>
</div>
Expand All @@ -188,16 +172,14 @@ type TextInputProps = {
name: string;
fieldMappingKey: keyof typeof fieldMapping;
type: ComponentProps<'input'>['type'];
showInstitutionInfo?: boolean;
};

const TextInput: FC<TextInputProps> = ({ className, label, name, fieldMappingKey, type, showInstitutionInfo }) => (
const TextInput: FC<TextInputProps> = ({ className, label, name, fieldMappingKey, type }) => (
<LabelledInputContainer
className={className}
label={label}
htmlFor={name}
required={fieldMapping[fieldMappingKey].required}
showInstitutionInfo={showInstitutionInfo}
>
<input
type={type}
Expand All @@ -221,7 +203,6 @@ const InstitutionNameInput = () => (
label='Institution'
name='institution-name'
fieldMappingKey='institution'
showInstitutionInfo
/>
);

Expand Down

0 comments on commit f555ecc

Please sign in to comment.