mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-23 22:31:12 +00:00
5ed9987345
* [Settings] Autocomplete input for Add Email Form * Applied PR Feedback GitOrigin-RevId: 27d2ef97deb836e92283e89675dfa3866f44904f
27 lines
659 B
TypeScript
27 lines
659 B
TypeScript
import useFetchMock from './../hooks/use-fetch-mock'
|
|
import { AddEmailInput } from '../../js/features/settings/components/emails/add-email-input'
|
|
|
|
export const EmailInput = args => {
|
|
useFetchMock(fetchMock =>
|
|
fetchMock.get(/\/institutions\/domains/, [
|
|
{ hostname: 'autocomplete.edu', id: 123 },
|
|
])
|
|
)
|
|
return (
|
|
<>
|
|
<AddEmailInput {...args} />
|
|
<br />
|
|
<div>
|
|
Use <code>autocomplete.edu</code> as domain to trigger an autocomplete
|
|
</div>
|
|
</>
|
|
)
|
|
}
|
|
|
|
export default {
|
|
title: 'Account Settings / Emails and Affiliations',
|
|
component: AddEmailInput,
|
|
argTypes: {
|
|
onChange: { action: 'change' },
|
|
},
|
|
}
|