Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Improve icons and styles
dominik-zeglenc0632e22d493
diff --git a/saleor/static/dashboard-next/components/RichTextEditor/RichTextEditor.tsx b/saleor/static/dashboard-next/components/RichTextEditor/RichTextEditor.tsxindex 4b2b397fce..a0b8e919a8 100644--- a/saleor/static/dashboard-next/components/RichTextEditor/RichTextEditor.tsx+++ b/saleor/static/dashboard-next/components/RichTextEditor/RichTextEditor.tsx@@ -6,6 +6,12 @@ import {} from "@material-ui/core/styles";import { fade } from "@material-ui/core/styles/colorManipulator";import Typography from "@material-ui/core/Typography";+import BoldIcon from "@material-ui/icons/FormatBold";+import ItalicIcon from "@material-ui/icons/FormatItalic";+import UnorderedListIcon from "@material-ui/icons/FormatListBulleted";+import OrderedListIcon from "@material-ui/icons/FormatListNumbered";+import QuotationIcon from "@material-ui/icons/FormatQuote";+import LinkIcon from "@material-ui/icons/Link";import { RawDraftContentState } from "draft-js";import {BLOCK_TYPE,@@ -15,6 +21,8 @@ import {} from "draftail";import * as React from "react";+import HeaderThree from "../../icons/HeaderThree";+import HeaderTwo from "../../icons/HeaderTwo";import LinkEntity from "./LinkEntity";import LinkSource from "./LinkSource";@@ -86,26 +94,28 @@ const styles = (theme: Theme) =>alignItems: "center",background: "none",border: "none",- borderRadius: 4,+ borderRight: `1px ${theme.palette.grey[300]} solid`,cursor: "pointer",display: "inline-flex",- height: 24,+ height: 36,justifyContent: "center",- marginLeft: theme.spacing.unit,- marginRight: theme.spacing.unit,- padding: 0,+ padding: theme.spacing.unit - 1,transition: theme.transitions.duration.short + "ms",- width: 24+ width: 36},"&Group": {+ "&:last-of-type": {+ "& .Draftail-ToolbarButton": {+ "&:last-of-type": {+ border: "none"+ }+ }+ },display: "flex"},border: `1px ${theme.palette.grey[300]} solid`,- borderRadius: 6,- display: "flex",- marginBottom: theme.spacing.unit,- paddingBottom: theme.spacing.unit,- paddingTop: theme.spacing.unit+ display: "inline-flex",+ marginBottom: theme.spacing.unit}}}@@ -133,24 +143,24 @@ const RichTextEditor = withStyles(styles, { name: "RichTextEditor" })(} as any)}blockTypes={[- { type: BLOCK_TYPE.HEADER_TWO },- { type: BLOCK_TYPE.HEADER_THREE },- { type: BLOCK_TYPE.BLOCKQUOTE },- { type: BLOCK_TYPE.UNORDERED_LIST_ITEM },- { type: BLOCK_TYPE.ORDERED_LIST_ITEM }+ { icon: <HeaderTwo />, type: BLOCK_TYPE.HEADER_TWO },+ { icon: <HeaderThree />, type: BLOCK_TYPE.HEADER_THREE },+ { icon: <QuotationIcon />, type: BLOCK_TYPE.BLOCKQUOTE },+ { icon: <UnorderedListIcon />, type: BLOCK_TYPE.UNORDERED_LIST_ITEM },+ { icon: <OrderedListIcon />, type: BLOCK_TYPE.ORDERED_LIST_ITEM }]}inlineStyles={[- { type: INLINE_STYLE.BOLD },- { type: INLINE_STYLE.ITALIC }+ { icon: <BoldIcon />, type: INLINE_STYLE.BOLD },+ { icon: <ItalicIcon />, type: INLINE_STYLE.ITALIC }]}entityTypes={[{attributes: ["href"],decorator: LinkEntity,+ icon: <LinkIcon />,source: LinkSource,type: ENTITY_TYPE.LINK- },- { type: ENTITY_TYPE.HORIZONTAL_RULE }+ }]}/></div>diff --git a/saleor/static/dashboard-next/icons/HeaderThree.tsx b/saleor/static/dashboard-next/icons/HeaderThree.tsxnew file mode 100644index 0000000000..f2f532c993--- /dev/null+++ b/saleor/static/dashboard-next/icons/HeaderThree.tsx@@ -0,0 +1,11 @@+import createSvgIcon from "@material-ui/icons/utils/createSvgIcon";+import * as React from "react";++export const HeaderThree = createSvgIcon(+ <>+ <path d="M11.7816 16.8663H9.81159V12.6952H5.97003V16.8663H4V7.13369H5.97003V11.0775H9.81159V7.13369H11.7816V16.8663Z" />+ <path d="M15.2357 11.1444H16.247C16.7286 11.1444 17.0854 11.0218 17.3174 10.7767C17.5494 10.5316 17.6655 10.2063 17.6655 9.8008C17.6655 9.40865 17.5494 9.10339 17.3174 8.88503C17.0898 8.66667 16.7746 8.55749 16.3718 8.55749C16.0084 8.55749 15.7042 8.65998 15.459 8.86497C15.2139 9.06551 15.0913 9.32843 15.0913 9.65374H13.1935C13.1935 9.14572 13.327 8.69118 13.5941 8.29011C13.8655 7.88458 14.242 7.56818 14.7235 7.34091C15.2095 7.11364 15.7436 7 16.3258 7C17.3371 7 18.1295 7.24733 18.703 7.74198C19.2765 8.23217 19.5633 8.90954 19.5633 9.77406C19.5633 10.2197 19.4297 10.6297 19.1627 11.004C18.8956 11.3783 18.5454 11.6658 18.112 11.8663C18.6505 12.0624 19.051 12.3565 19.3137 12.7487C19.5808 13.1408 19.7143 13.6043 19.7143 14.139C19.7143 15.0036 19.4035 15.6965 18.7818 16.2179C18.1645 16.7393 17.3459 17 16.3258 17C15.3715 17 14.59 16.7438 13.9815 16.2313C13.3774 15.7188 13.0753 15.0414 13.0753 14.1992H14.9731C14.9731 14.5646 15.1066 14.8632 15.3736 15.0949C15.6451 15.3266 15.9778 15.4425 16.3718 15.4425C16.8227 15.4425 17.1751 15.3222 17.429 15.0816C17.6873 14.8365 17.8165 14.5134 17.8165 14.1123C17.8165 13.1408 17.2911 12.6551 16.2405 12.6551H15.2357V11.1444Z" />+ </>+);+HeaderThree.displayName = "HeaderThree";+export default HeaderThree;diff --git a/saleor/static/dashboard-next/icons/HeaderTwo.tsx b/saleor/static/dashboard-next/icons/HeaderTwo.tsxnew file mode 100644index 0000000000..c33b024895--- /dev/null+++ b/saleor/static/dashboard-next/icons/HeaderTwo.tsx@@ -0,0 +1,11 @@+import createSvgIcon from "@material-ui/icons/utils/createSvgIcon";+import * as React from "react";++export const HeaderTwo = createSvgIcon(+ <>+ <path d="M12.0612 17H10.0204V12.7724H6.04082V17H4V7.1355H6.04082V11.1328H10.0204V7.1355H12.0612V17Z" />+ <path d="M20.4286 17H13.6395V15.6585L16.8435 12.2575C17.2834 11.7787 17.6077 11.3609 17.8163 11.0041C18.0295 10.6472 18.1361 10.3085 18.1361 9.9878C18.1361 9.54968 18.0249 9.20641 17.8027 8.95799C17.5805 8.70506 17.263 8.57859 16.8503 8.57859C16.4059 8.57859 16.0544 8.73216 15.7959 9.0393C15.542 9.34192 15.415 9.74164 15.415 10.2385H13.4422C13.4422 9.63776 13.585 9.08898 13.8707 8.59214C14.161 8.0953 14.5692 7.70687 15.0952 7.42683C15.6213 7.14228 16.2177 7 16.8844 7C17.9048 7 18.6961 7.2439 19.2585 7.73171C19.8254 8.21951 20.1088 8.90831 20.1088 9.7981C20.1088 10.2859 19.9819 10.7827 19.7279 11.2886C19.4739 11.7945 19.0385 12.3839 18.4218 13.0569L16.1701 15.4214H20.4286V17Z" />+ </>+);+HeaderTwo.displayName = "HeaderTwo";+export default HeaderTwo;