mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-23 11:37:02 -04:00
Improve sign in button (#123)
* Improve sign in button Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> * Add missing size attribute Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> * reformat code Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
parent
39b1175850
commit
a62e3857b4
4 changed files with 26 additions and 26 deletions
|
@ -1,16 +1,21 @@
|
|||
import React from 'react'
|
||||
import { Button } from 'react-bootstrap'
|
||||
import { ButtonProps } from 'react-bootstrap/Button'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { LinkContainer } from 'react-router-bootstrap'
|
||||
|
||||
export const SignInButton: React.FC = () => {
|
||||
type SignInButtonProps = {
|
||||
className?: string
|
||||
} & Omit<ButtonProps, 'href'>
|
||||
|
||||
export const SignInButton: React.FC<SignInButtonProps> = ({ variant, ...props }) => {
|
||||
const { t } = useTranslation()
|
||||
|
||||
return (
|
||||
<LinkContainer to="/login" title={t('login.signIn')}>
|
||||
<Button
|
||||
variant="success"
|
||||
size="sm"
|
||||
variant={variant || 'success'}
|
||||
{...props}
|
||||
>
|
||||
<Trans i18nKey="login.signIn"/>
|
||||
</Button>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue