mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-09 13:51:57 -04:00
fix: deduplicate different buttons
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
160f0f8297
commit
aa6bd2a884
12 changed files with 44 additions and 194 deletions
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
import { cypressId } from '../../../utils/cypress-attribute'
|
||||
import { IconButton } from '../icon-button/icon-button'
|
||||
import Link from 'next/link'
|
||||
import React from 'react'
|
||||
import { FileEarmarkPlus as IconPlus } from 'react-bootstrap-icons'
|
||||
import { Trans } from 'react-i18next'
|
||||
|
||||
/**
|
||||
* Links to the "new note" endpoint
|
||||
*/
|
||||
export const NewNoteButton: React.FC = () => {
|
||||
return (
|
||||
<Link href={'/new'} passHref={true}>
|
||||
<IconButton {...cypressId('new-note-button')} iconSize={1.5} size={'sm'} icon={IconPlus}>
|
||||
<Trans i18nKey='navigation.newNote' />
|
||||
</IconButton>
|
||||
</Link>
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue