Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix story and responsiveness

dominik-zeglenbef1c8d9fec6
diff --git a/saleor/static/dashboard-next/components/RichTextEditor/RichTextEditor.tsx b/saleor/static/dashboard-next/components/RichTextEditor/RichTextEditor.tsx
index 3118e083b9..8a3d13dcb6 100644
--- a/saleor/static/dashboard-next/components/RichTextEditor/RichTextEditor.tsx
+++ b/saleor/static/dashboard-next/components/RichTextEditor/RichTextEditor.tsx
@@ -188,7 +188,11 @@ const styles = (theme: Theme) =>
background: theme.palette.background.default,
border: `1px ${theme.overrides.MuiCard.root.borderColor} solid`,
display: "inline-flex",
- marginBottom: theme.spacing.unit
+ flexWrap: "wrap",
+ marginBottom: theme.spacing.unit,
+ [theme.breakpoints.down(460)]: {
+ width: "min-content"
+ }
},
"&-block": {
"&--blockquote": {
diff --git a/saleor/static/dashboard-next/storybook/stories/components/RichTextEditor.tsx b/saleor/static/dashboard-next/storybook/stories/components/RichTextEditor.tsx
index 122e49654c..b411ecb586 100644
--- a/saleor/static/dashboard-next/storybook/stories/components/RichTextEditor.tsx
+++ b/saleor/static/dashboard-next/storybook/stories/components/RichTextEditor.tsx
@@ -26,6 +26,24 @@ export const content: RawDraftContentState = {
text: "italic",
type: "unstyled"
},
+ {
+ data: {},
+ depth: 0,
+ entityRanges: [],
+ inlineStyleRanges: [{ offset: 0, length: 13, style: "STRIKETHROUGH" }],
+ key: "1p044",
+ text: "strikethrough",
+ type: "unstyled"
+ },
+ {
+ data: {},
+ depth: 0,
+ entityRanges: [],
+ inlineStyleRanges: [],
+ key: "aven6",
+ text: "h1",
+ type: "header-one"
+ },
{
data: {},
depth: 0,
@@ -86,8 +104,8 @@ export const content: RawDraftContentState = {
}
};
storiesOf("Generics / Rich text editor", module)
-.addDecorator(CardDecorator)
-.addDecorator(Decorator)
+ .addDecorator(CardDecorator)
+ .addDecorator(Decorator)
.add("default", () => (
<RichTextEditor
disabled={false}