-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: New
Prose
component to style free-form HTML content consisten…
…tly (#756) * feat: New `Prose` component to style free-form HTML content consistently
- Loading branch information
Showing
19 changed files
with
616 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"generatedAt":1676988479996,"builder":{"name":"webpack4"},"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":false,"hasStorybookEslint":false,"refCount":0,"packageManager":{"type":"npm","version":"8.15.0"},"typescriptOptions":{"check":true,"checkOptions":{},"reactDocgen":"react-docgen-typescript","reactDocgenTypescriptOptions":{"shouldExtractLiteralValuesFromEnum":true}},"features":{"interactionsDebugger":true},"storybookVersion":"^6.5.3","language":"typescript","storybookPackages":{"@storybook/addon-knobs":{"version":"6.3.1"},"@storybook/addon-links":{"version":"6.5.3"},"@storybook/addons":{"version":"6.5.3"},"@storybook/jest":{"version":"0.0.10"},"@storybook/react":{"version":"6.5.3"},"@storybook/testing-library":{"version":"0.0.13"}},"framework":{"name":"react"},"addons":{"@storybook/addon-postcss":{"version":"2.0.0"},"@storybook/addon-actions":{"version":"6.5.3"},"@storybook/addon-docs":{"options":{"configureJSX":true},"version":"6.5.3"},"@storybook/addon-controls":{"version":"6.5.3"},"@geometricpanda/storybook-addon-badges":{"version":"0.2.2"},"@storybook/addon-interactions":{"version":"6.5.15"}}} | ||
{"generatedAt":1677608237660,"builder":{"name":"webpack4"},"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":false,"hasStorybookEslint":false,"refCount":0,"packageManager":{"type":"npm","version":"8.19.2"},"typescriptOptions":{"check":true,"checkOptions":{},"reactDocgen":"react-docgen-typescript","reactDocgenTypescriptOptions":{"shouldExtractLiteralValuesFromEnum":true}},"features":{"interactionsDebugger":true},"storybookVersion":"^6.5.3","language":"typescript","storybookPackages":{"@storybook/addon-knobs":{"version":"6.3.1"},"@storybook/addon-links":{"version":"6.5.3"},"@storybook/addons":{"version":"6.5.3"},"@storybook/jest":{"version":"0.0.10"},"@storybook/react":{"version":"6.5.3"},"@storybook/testing-library":{"version":"0.0.13"}},"framework":{"name":"react"},"addons":{"@storybook/addon-postcss":{"version":"2.0.0"},"@storybook/addon-actions":{"version":"6.5.3"},"@storybook/addon-docs":{"options":{"configureJSX":true},"version":"6.5.3"},"@storybook/addon-controls":{"version":"6.5.3"},"@geometricpanda/storybook-addon-badges":{"version":"0.2.2"},"@storybook/addon-interactions":{"version":"6.5.15"}}} |
6 changes: 3 additions & 3 deletions
6
docs/vendors~main.f0057794.iframe.bundle.js → docs/vendors~main.6eae3178.iframe.bundle.js
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
"email": "[email protected]", | ||
"url": "http://doist.com" | ||
}, | ||
"version": "20.0.3", | ||
"version": "20.1.0", | ||
"license": "MIT", | ||
"homepage": "https://github.com/Doist/reactist#readme", | ||
"repository": { | ||
|
@@ -89,6 +89,7 @@ | |
"@types/classnames": "^2.2.10", | ||
"@types/enzyme": "^3.10.7", | ||
"@types/jest-axe": "^3.5.3", | ||
"@types/marked": "^4.0.8", | ||
"@types/react": "^17.0.45", | ||
"@types/react-dom": "^17.0.17", | ||
"@typescript-eslint/eslint-plugin": "^5.25.0", | ||
|
@@ -116,6 +117,7 @@ | |
"less": "^3.8.1", | ||
"less-loader": "^7.0.0", | ||
"lint-staged": "^10.4.0", | ||
"marked": "^4.2.12", | ||
"mini-css-extract-plugin": "^0.11.0", | ||
"mockdate": "^3.0.2", | ||
"optimize-css-assets-webpack-plugin": "^5.0.3", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { Prose } from './prose' | ||
export type { ProseProps } from './prose' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
import { marked } from 'marked' | ||
|
||
export const proseExample = marked(` | ||
# An h1 header | ||
This is a paragraph. Paragraphs can have any length, and when long enough, their content wraps over | ||
multiple lines. This paragraph, for instance, should be long enough to do so in the most common | ||
screen sizes that are comfortable to read anyway. | ||
A second paragraph now. One that contains [a link to Doist.com](https://doist.com), and text | ||
formatting examples, such as **bold text**, _italic text_, and \`monospace\`. Now let’s continue | ||
with a list: | ||
- this one | ||
- that one | ||
- the other one | ||
And a blockquote: | ||
> Blockquotes are indented and have a border on the left. The text color is slightly dimmed. | ||
> | ||
> They can span multiple paragraphs, if you like. | ||
> | ||
> > And they can be nested too. | ||
## An h2 header | ||
Here's a numbered list: | ||
1. first item | ||
2. second item | ||
3. third item | ||
Here's a multi-line code example: | ||
# Let me re-iterate ... | ||
for i in 1 .. 10 { do-something(i) } | ||
And another one | ||
\`\`\`python | ||
import time | ||
# Quick, count to ten! | ||
for i in range(10): | ||
# (but not *too* quick) | ||
time.sleep(0.5) | ||
print i | ||
\`\`\` | ||
### An h3 header | ||
Now a nested list: | ||
1. First, get these ingredients: | ||
- carrots | ||
- celery | ||
- lentils | ||
2. Boil some water. | ||
3. Dump everything in the pot and follow | ||
this algorithm: | ||
find wooden spoon | ||
uncover pot | ||
stir | ||
cover pot | ||
balance wooden spoon precariously on pot handle | ||
wait 10 minutes | ||
goto first step (or shut off burner when done) | ||
Do not bump wooden spoon or it will fall. | ||
--- | ||
A horizontal rule follows. | ||
--- | ||
The End | ||
`) |
Oops, something went wrong.