From 200049cceeb3e10b002afdd7a709e07e0fdb48d4 Mon Sep 17 00:00:00 2001 From: TatianaLopaeva Date: Mon, 1 Mar 2021 15:50:16 +0300 Subject: [PATCH 1/2] Web: Components: input-block: Fix icons displaying & added search.react icon. --- packages/asc-web-components/input-block/index.js | 6 +++--- public/images/search.react.svg | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 public/images/search.react.svg diff --git a/packages/asc-web-components/input-block/index.js b/packages/asc-web-components/input-block/index.js index 7921aa1898..59652b59d2 100644 --- a/packages/asc-web-components/input-block/index.js +++ b/packages/asc-web-components/input-block/index.js @@ -10,7 +10,7 @@ import { StyledIconBlock, } from "./styled-input-block"; -const iconNames = Object.keys(Icons); +//const iconNames = Object.keys(Icons); class InputBlock extends React.Component { constructor(props) { @@ -116,7 +116,7 @@ class InputBlock extends React.Component { mask={mask} keepCharPositions={keepCharPositions} /> - {iconNames.includes(iconName) && ( + {//iconNames.includes(iconName) && (
- )} + } ); } diff --git a/public/images/search.react.svg b/public/images/search.react.svg new file mode 100644 index 0000000000..49cc89c87c --- /dev/null +++ b/public/images/search.react.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file From f452b09ecd6cf126906943454571281c190e7e6e Mon Sep 17 00:00:00 2001 From: Vladislav Makhov Date: Mon, 1 Mar 2021 16:11:45 +0300 Subject: [PATCH 2/2] web: fix icons --- .../FilterInput/sub-components/CloseButton.js | 2 +- packages/asc-web-components/input-block/index.js | 5 +++-- .../Client/src/components/Article/Body/index.js | 11 ++++++----- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/asc-web-common/components/FilterInput/sub-components/CloseButton.js b/packages/asc-web-common/components/FilterInput/sub-components/CloseButton.js index 842b3813da..43aed58c4e 100644 --- a/packages/asc-web-common/components/FilterInput/sub-components/CloseButton.js +++ b/packages/asc-web-common/components/FilterInput/sub-components/CloseButton.js @@ -13,7 +13,7 @@ const CloseButton = (props) => { color={"#A3A9AE"} clickColor={"#A3A9AE"} size={10} - iconName={"/static/images/cross.react.svg"} + iconName="/static/images/cross.react.svg" isFill={true} isDisabled={isDisabled} onClick={!isDisabled ? onClick : undefined} diff --git a/packages/asc-web-components/input-block/index.js b/packages/asc-web-components/input-block/index.js index 7921aa1898..1e72d951c1 100644 --- a/packages/asc-web-components/input-block/index.js +++ b/packages/asc-web-components/input-block/index.js @@ -10,7 +10,7 @@ import { StyledIconBlock, } from "./styled-input-block"; -const iconNames = Object.keys(Icons); +// const iconNames = Object.keys(Icons); class InputBlock extends React.Component { constructor(props) { @@ -116,7 +116,8 @@ class InputBlock extends React.Component { mask={mask} keepCharPositions={keepCharPositions} /> - {iconNames.includes(iconName) && ( + {/* {iconNames.includes(iconName) && ( */} + {iconName && (
{ key={item.key} icon={ item.root ? ( - + // TODO: Add isFill prop if need + // ) : ( "" )