mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-04 21:24:50 -05:00
5bc28ffa8c
[web] Fix TS issues in stories GitOrigin-RevId: 093102351c2ca3d4bf05e6de2ce0dda55d421df1
30 lines
711 B
TypeScript
30 lines
711 B
TypeScript
import useFetchMock from './../hooks/use-fetch-mock'
|
|
import Input from '../../js/features/settings/components/emails/add-email/input'
|
|
|
|
export const EmailInput = (args: any) => {
|
|
useFetchMock(fetchMock =>
|
|
fetchMock.get(/\/institutions\/domains/, [
|
|
{
|
|
hostname: 'autocomplete.edu',
|
|
university: { id: 123, name: 'Auto Complete University' },
|
|
},
|
|
])
|
|
)
|
|
return (
|
|
<>
|
|
<Input {...args} />
|
|
<br />
|
|
<div>
|
|
Use <code>autocomplete.edu</code> as domain to trigger an autocomplete
|
|
</div>
|
|
</>
|
|
)
|
|
}
|
|
|
|
export default {
|
|
title: 'Account Settings / Emails and Affiliations',
|
|
component: Input,
|
|
argTypes: {
|
|
onChange: { action: 'change' },
|
|
},
|
|
}
|