Skip to content

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

Add dropdown arrows

dominik-zeglen9578acf4d517
diff --git a/saleor/static/dashboard-next/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx b/saleor/static/dashboard-next/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx
index e99a1c9f28..6719cf51a6 100644
--- a/saleor/static/dashboard-next/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx
+++ b/saleor/static/dashboard-next/components/MultiAutocompleteSelectField/MultiAutocompleteSelectField.tsx
@@ -7,6 +7,7 @@ import Downshift, { ControllerStateAndHelpers } from "downshift";
import * as React from "react";
import i18n from "../../i18n";
+import ArrowDropdownIcon from "../../icons/ArrowDropdown";
interface ChoiceType {
label: string;
@@ -118,6 +119,7 @@ export const MultiAutocompleteSelectField = decorate<
onKeyDown: handleKeyDown(inputValue),
placeholder
}),
+ endAdornment: <ArrowDropdownIcon />,
startAdornment: selectedItem.map(item => (
<Chip
key={item.value}
diff --git a/saleor/static/dashboard-next/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx b/saleor/static/dashboard-next/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx
index 8dc9818fee..e88356a690 100644
--- a/saleor/static/dashboard-next/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx
+++ b/saleor/static/dashboard-next/components/SingleAutocompleteSelectField/SingleAutocompleteSelectField.tsx
@@ -7,6 +7,7 @@ import * as React from "react";
import { compareTwoStrings } from "string-similarity";
import i18n from "../../i18n";
+import ArrowDropdownIcon from "../../icons/ArrowDropdown";
interface SingleAutocompleteSelectFieldProps {
name: string;
@@ -99,7 +100,8 @@ const SingleAutocompleteSelectFieldComponent = decorate<
},
...getInputProps({
placeholder
- })
+ }),
+ endAdornment: <ArrowDropdownIcon />
}}
disabled={disabled}
helperText={helperText}
diff --git a/saleor/static/dashboard-next/icons/ArrowDropdown.tsx b/saleor/static/dashboard-next/icons/ArrowDropdown.tsx
new file mode 100644
index 0000000000..e8f324da36
--- /dev/null
+++ b/saleor/static/dashboard-next/icons/ArrowDropdown.tsx
@@ -0,0 +1,10 @@
+import createSvgIcon from "@material-ui/icons/utils/createSvgIcon";
+import * as React from "react";
+
+export const NoPhoto = createSvgIcon(
+ <g style={{ fillRule: "evenodd" }}>
+ <path d="M7 10l5 5 5-5z" />
+ </g>
+);
+NoPhoto.displayName = "NoPhoto";
+export default NoPhoto;