mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
23d1bfd11e
* [Settings] Link SSO email GitOrigin-RevId: c46ed1709ceedd74df52e02a87f22614d024afea
30 lines
732 B
TypeScript
30 lines
732 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',
|
|
university: { id: 123, name: 'Auto Complete University' },
|
|
},
|
|
])
|
|
)
|
|
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' },
|
|
},
|
|
}
|