forstok-ui-lib 6.7.6 → 6.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forstok-ui-lib",
3
- "version": "6.7.6",
3
+ "version": "6.7.7",
4
4
  "description": "Forstok UI Components Library",
5
5
  "path": "dist",
6
6
  "main": "dist/index.js",
@@ -4,7 +4,7 @@ import { InitialContainer, APILabel } from '../../assets/stylesheets/shares.styl
4
4
 
5
5
  import { ImageMode } from './type'
6
6
 
7
- const ImageChannelComponent = ({ data, label, size, isImageOnly, $mode }:{ data?: any, label?: string, size?: string, isImageOnly?: boolean, $mode?: ImageMode }) => {
7
+ const ImageChannelComponent = ({ data, label, size, isImageOnly, $mode, $isPhone }:{ data?: any, label?: string, size?: string, isImageOnly?: boolean, $mode?: ImageMode, $isPhone?: boolean }) => {
8
8
  const fontSize = size ? ((parseInt(size) / 2) > 10 ? (parseInt(size) / 2) : 10) : 10
9
9
  const defSize = size || '20px'
10
10
 
@@ -18,6 +18,7 @@ const ImageChannelComponent = ({ data, label, size, isImageOnly, $mode }:{ data?
18
18
  const defSrc = data?.icon || data?.imageUrl || data?.channelImage || data?.channel_image || ''
19
19
  const defColor = data?.color || data?.channelColor || data?.channel_color || '#ooo'
20
20
  const defInitial = data?.channelInitials || data?.channelInitial || data?.channel_initials || data?.initials || ''
21
+ const defPhone = data?.phone || data?.storeId || '-'
21
22
  const isAPI = data?.availableAPI
22
23
 
23
24
  return (
@@ -50,10 +51,21 @@ const ImageChannelComponent = ({ data, label, size, isImageOnly, $mode }:{ data?
50
51
  )}
51
52
  </div>
52
53
  {!isImageOnly && (
53
- <span className='multi-elipsis' title={defName}>
54
- {defName}
55
- {isAPI && <APILabel className='_refLabel'>API</APILabel>}
56
- </span>
54
+ $isPhone ? (
55
+ <>
56
+ <span className='multi-elipsis' title={defName}>
57
+ {defName}
58
+ </span>
59
+ <aside className='multi-elipsis' title={defPhone}>
60
+ {defPhone}
61
+ </aside>
62
+ </>
63
+ ) : (
64
+ <span className='multi-elipsis' title={defName}>
65
+ {defName}
66
+ {isAPI && <APILabel className='_refLabel'>API</APILabel>}
67
+ </span>
68
+ )
57
69
  )}
58
70
  </>
59
71
  )