From b13cc1cae700f6e09e28ed46e89000a78b61b34d Mon Sep 17 00:00:00 2001 From: konstantin krivlenia Date: Fri, 12 Apr 2019 20:37:32 +0300 Subject: [PATCH] #299 add quote format button --- web/app/@types/markdown-toolbar-element/index.d.ts | 1 + .../input/markdown-toolbar-icons/quote-icon.tsx | 13 +++++++++++++ web/app/components/input/markdown-toolbar.tsx | 7 +++++++ 3 files changed, 21 insertions(+) create mode 100644 web/app/components/input/markdown-toolbar-icons/quote-icon.tsx diff --git a/web/app/@types/markdown-toolbar-element/index.d.ts b/web/app/@types/markdown-toolbar-element/index.d.ts index b7849c6a..2278aab9 100644 --- a/web/app/@types/markdown-toolbar-element/index.d.ts +++ b/web/app/@types/markdown-toolbar-element/index.d.ts @@ -8,5 +8,6 @@ declare namespace JSX { 'md-bold': any; 'md-header': any; 'md-italic': any; + 'md-quote': any; } } diff --git a/web/app/components/input/markdown-toolbar-icons/quote-icon.tsx b/web/app/components/input/markdown-toolbar-icons/quote-icon.tsx new file mode 100644 index 00000000..aecdc2cf --- /dev/null +++ b/web/app/components/input/markdown-toolbar-icons/quote-icon.tsx @@ -0,0 +1,13 @@ +/** @jsx h */ +import { h } from 'preact'; + +export default function QuoteIcon() { + return ( + + ); +} diff --git a/web/app/components/input/markdown-toolbar.tsx b/web/app/components/input/markdown-toolbar.tsx index 3ff6b30d..58f2fccb 100644 --- a/web/app/components/input/markdown-toolbar.tsx +++ b/web/app/components/input/markdown-toolbar.tsx @@ -4,6 +4,7 @@ import '@github/markdown-toolbar-element'; import BoldIcon from './markdown-toolbar-icons/bold-icon'; import HeaderIcon from './markdown-toolbar-icons/header-icon'; import ItalicIcon from './markdown-toolbar-icons/italic-icon'; +import QuoteIcon from './markdown-toolbar-icons/quote-icon'; interface Props { textareaId: string; @@ -12,6 +13,7 @@ interface Props { const boldLabel = 'Add bold text '; const headerLabel = 'Add header text'; const italicLabel = 'Add italic text '; +const quoteLabel = 'Add italic text '; export default class MarkdownToolbar extends Component { render(props: RenderableProps) { @@ -28,6 +30,11 @@ export default class MarkdownToolbar extends Component { +
+ + + +
); }