mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-24 01:41:41 +00:00
28 lines
659 B
TypeScript
28 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' },
|
||
|
},
|
||
|
}
|