import React from "react";
import { bem } from "../../utilities/bem";
import { Box } from "../Box";
import { Fixed } from "../Fixed";
import { Heading } from "../Heading";
import { Paragraph } from "../Paragraph";
import { Relative } from "../Relative";
import { Absolute } from "../Absolute";
import { CloseButton } from "../CloseButton";
const cn = "MarkdownHelp";
const CodeExamples = ({
heading,
headingLevel = 3,
children,
}: {
heading: string;
children: string[];
headingLevel?: 3 | 4;
}) => (
<>
{headingLevel === 3 ? (
{heading}
) : (
{heading}
)}
{React.Children.map(children, (child) => (
{child}
))}
>
);
export const MarkdownHelp = ({
isOpen,
onClose,
}: {
isOpen: boolean;
onClose: () => void;
}) => {
return isOpen ? (
Markdown help
Here’s an overview of Markdown syntax that you can use within the
editor.
{[
"# This is an tag",
"## This is an tag",
"### This is an tag",
"#### This is an tag",
"##### This is an tag",
"###### This is an tag",
]}
{[
"*This text will be italic*",
"_This will also be italic_",
"**This text will be bold**",
"__This will also be bold__",
"_You **can** combine them_",
]}
Lists
{["* Item 1", "* Item 2", " * Item 2a", " * Item 2b"]}
{["1. Item 1", "1. Item 2", " 1. Item 2a", " 1. Item 2b"]}
{[
"http://www.aptible.com - automatic",
"[Aptible](http://www.aptible.com)",
]}
{["> This is a quote that someone said."]}
{["I think you should use a `div` element here."]}
{["```", "An example code block", "```"]}
{["---"]}
{[
"To add a line break instead of a return,··↵",
"put two spaces at the end of the line and press return.",
"↵",
"To add a line return, or to start a new paragraph, put a full↵",
"↵",
"return between the lines.",
]}
Images
{[""]}
{[
"![alt text][image]",
"[image]: https://www.aptible.com/image.jpg",
]}
) : null;
};