-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore:
LoginForm
a11y improvements (#30337)
- Loading branch information
1 parent
d37503b
commit e9ef5d7
Showing
7 changed files
with
119 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
import { useSetting } from '@rocket.chat/ui-contexts'; | ||
import type { ReactElement } from 'react'; | ||
import type { AllHTMLAttributes } from 'react'; | ||
|
||
import HorizontalTemplate from './template/HorizontalTemplate'; | ||
import VerticalTemplate from './template/VerticalTemplate'; | ||
|
||
const RegisterTemplate = ({ children }: { children: ReactElement }): ReactElement => { | ||
const RegisterTemplate = ({ children, ...props }: AllHTMLAttributes<HTMLElement>) => { | ||
const template = useSetting<'vertical-template' | 'horizontal-template'>('Layout_Login_Template'); | ||
|
||
if (template === 'vertical-template') { | ||
return <VerticalTemplate>{children}</VerticalTemplate>; | ||
} | ||
return <HorizontalTemplate>{children}</HorizontalTemplate>; | ||
return ( | ||
<main> | ||
{template === 'vertical-template' && <VerticalTemplate {...props} children={children} />} | ||
{template === 'horizontal-template' && <HorizontalTemplate {...props} children={children} />} | ||
</main> | ||
); | ||
}; | ||
|
||
export default RegisterTemplate; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters