mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-26 05:16:41 +07:00
added notes menu
This commit is contained in:
parent
fce11163aa
commit
57f37723fa
14 changed files with 203 additions and 105 deletions
|
@ -3,6 +3,7 @@ import React, { VFC } from 'react';
|
|||
import { Card } from '~/components/containers/Card';
|
||||
import { Markdown } from '~/components/containers/Markdown';
|
||||
import { Padder } from '~/components/containers/Padder';
|
||||
import { NoteMenu } from '~/components/notes/NoteMenu';
|
||||
import { formatText, getPrettyDate } from '~/utils/dom';
|
||||
|
||||
import styles from './styles.module.scss';
|
||||
|
@ -15,8 +16,10 @@ interface NoteCardProps {
|
|||
const NoteCard: VFC<NoteCardProps> = ({ content, createdAt }) => (
|
||||
<Card className={styles.note}>
|
||||
<Padder>
|
||||
<NoteMenu onEdit={console.log} onDelete={console.log} />
|
||||
<Markdown className={styles.wrap} dangerouslySetInnerHTML={{ __html: formatText(content) }} />
|
||||
</Padder>
|
||||
|
||||
<Padder className={styles.footer}>{getPrettyDate(createdAt)}</Padder>
|
||||
</Card>
|
||||
);
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
min-width: 0;
|
||||
word-break: break-word;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
|
||||
& > * {
|
||||
@include row_shadow;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue