overleaf-cep/services/web/frontend/stories/settings/sso-alert.stories.tsx
Rebeka Dekany 562ef81389 Cleanup Bootstrap 3 code in the Account settings page (#24058)
* Remove the Bootstrap 5 version utilities

* Remove Account settings LESS stylesheet and unused styles

* Prefer using the OLFormText wrapper component instead of FormText

* Remove the Bootstrap 3 version stories

* Replace Font Awesome icons to Material icons

* Fix the heading hierarchy

* Cleanup unused translation

* Restore ellipsis to the text of two loading spinners

* Add loading button tests back and add some button loading labels

---------

Co-authored-by: Tim Down <158919+timdown@users.noreply.github.com>
GitOrigin-RevId: 283a9167c8c78bf0fe5062840ded6917dcd6263b
2025-03-24 10:49:33 +00:00

56 lines
1.4 KiB
TypeScript

import EmailsSection from '../../js/features/settings/components/emails-section'
import { SSOAlert } from '../../js/features/settings/components/emails/sso-alert'
export const Info = () => {
window.metaAttributesCache.set('ol-institutionLinked', {
universityName: 'Overleaf University',
})
return <SSOAlert />
}
export const InfoWithEntitlement = () => {
window.metaAttributesCache.set('ol-institutionLinked', {
universityName: 'Overleaf University',
hasEntitlement: true,
})
return <SSOAlert />
}
export const NonCanonicalEmail = () => {
window.metaAttributesCache.set('ol-institutionLinked', {
universityName: 'Overleaf University',
})
window.metaAttributesCache.set(
'ol-institutionEmailNonCanonical',
'user@example.com'
)
return <SSOAlert />
}
export const Error = () => {
window.metaAttributesCache.set('ol-samlError', {
translatedMessage: 'There was an Error',
})
return <SSOAlert />
}
export const ErrorTranslated = () => {
window.metaAttributesCache.set('ol-samlError', {
translatedMessage: 'Translated Error Message',
message: 'There was an Error',
})
return <SSOAlert />
}
export const ErrorWithTryAgain = () => {
window.metaAttributesCache.set('ol-samlError', {
message: 'There was an Error',
tryAgain: true,
})
return <SSOAlert />
}
export default {
title: 'Account Settings / SSO Alerts',
component: EmailsSection,
}