From 59d665af9d4c2dc505e5d5267b02b1df96e90a7d Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Thu, 28 Oct 2021 13:53:22 +0200 Subject: chore: remove @mdi/font in favor of using icons with @mdi/js directly (#2158) Co-authored-by: Vijay A --- src/components/ui/ImageUpload.tsx | 6 ++++-- src/components/ui/InfoBar.js | 8 ++++++-- src/components/ui/Infobox.js | 15 ++++++++++++--- src/components/ui/SearchInput.tsx | 12 +++++++----- src/components/ui/input/index.tsx | 2 +- 5 files changed, 30 insertions(+), 13 deletions(-) (limited to 'src/components/ui') diff --git a/src/components/ui/ImageUpload.tsx b/src/components/ui/ImageUpload.tsx index 4b25be502..118e6b206 100644 --- a/src/components/ui/ImageUpload.tsx +++ b/src/components/ui/ImageUpload.tsx @@ -3,7 +3,9 @@ import { observer } from 'mobx-react'; import { Field } from 'mobx-react-form'; import classnames from 'classnames'; import Dropzone, { DropzoneRef } from 'react-dropzone'; +import { mdiDelete, mdiFileImage } from '@mdi/js'; import { isWindows } from '../../environment'; +import { Icon } from './icon'; type Props = { field: typeof Field; @@ -75,7 +77,7 @@ class ImageUpload extends Component { } }} > - +

{textDelete}

@@ -92,7 +94,7 @@ class ImageUpload extends Component { > {({ getRootProps, getInputProps }) => (
- +

{textUpload}

diff --git a/src/components/ui/InfoBar.js b/src/components/ui/InfoBar.js index 3311a949f..89b085907 100644 --- a/src/components/ui/InfoBar.js +++ b/src/components/ui/InfoBar.js @@ -5,7 +5,9 @@ import classnames from 'classnames'; import Loader from 'react-loader'; import { defineMessages, injectIntl } from 'react-intl'; +import { mdiClose } from '@mdi/js'; import Appear from './effects/Appear'; +import { Icon } from './icon'; const messages = defineMessages({ hide: { @@ -88,10 +90,12 @@ class InfoBar extends Component { {!sticky && ( )} ); diff --git a/src/components/ui/Infobox.js b/src/components/ui/Infobox.js index b88b01bd8..c0ba8f13c 100644 --- a/src/components/ui/Infobox.js +++ b/src/components/ui/Infobox.js @@ -4,6 +4,13 @@ import { observer } from 'mobx-react'; import classnames from 'classnames'; import Loader from 'react-loader'; import { defineMessages, injectIntl } from 'react-intl'; +import { mdiAlert, mdiCheckboxMarkedCircleOutline, mdiClose } from '@mdi/js'; +import { Icon } from '../ui/icon'; + +const icons = { + 'checkbox-marked-circle-outline': mdiCheckboxMarkedCircleOutline, + alert: mdiAlert, +}; const messages = defineMessages({ dismiss: { @@ -73,7 +80,7 @@ class Infobox extends Component { 'infobox--default': !type, })} > - {icon && } + {icon && }
{children}
{ctaLabel && ( )}
); diff --git a/src/components/ui/SearchInput.tsx b/src/components/ui/SearchInput.tsx index af55b0e11..49a50a4a0 100644 --- a/src/components/ui/SearchInput.tsx +++ b/src/components/ui/SearchInput.tsx @@ -2,6 +2,8 @@ import { ChangeEvent, Component } from 'react'; import { observer } from 'mobx-react'; import classnames from 'classnames'; import { debounce } from 'lodash'; +import { mdiCloseCircleOutline, mdiMagnify } from '@mdi/js'; +import { Icon } from './icon'; type Props = { value: string; @@ -88,7 +90,8 @@ class SearchInput extends Component { return (
-
); diff --git a/src/components/ui/input/index.tsx b/src/components/ui/input/index.tsx index 0b16fe688..c46cafc5c 100644 --- a/src/components/ui/input/index.tsx +++ b/src/components/ui/input/index.tsx @@ -178,7 +178,7 @@ class InputComponent extends Component { } tabIndex={-1} > - + )} -- cgit v1.2.3-70-g09d2