widenarrow-ui 0.1.20 → 0.1.21
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/lib/components/DropDownItem/DropDownItem.d.ts +1 -0
- package/lib/index.esm.js +34 -34
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +34 -34
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Button/Button.module.scss +4 -0
- package/src/components/DropDown/DropDown.stories.tsx +2 -1
- package/src/components/DropDownItem/DropDownItem.tsx +8 -1
- package/src/components/FacetButton/FacetButton.module.scss +2 -3
package/package.json
CHANGED
|
@@ -25,6 +25,7 @@ $button-l-min-width: 48px;
|
|
|
25
25
|
/* Corrects inability to style clickable `input` types in iOS */
|
|
26
26
|
// -webkit-appearance: none;
|
|
27
27
|
appearance: none;
|
|
28
|
+
max-width: 100%;
|
|
28
29
|
|
|
29
30
|
@include buttonColorBase;
|
|
30
31
|
|
|
@@ -109,6 +110,9 @@ $button-l-min-width: 48px;
|
|
|
109
110
|
|
|
110
111
|
.text {
|
|
111
112
|
display: block;
|
|
113
|
+
white-space: nowrap;
|
|
114
|
+
overflow: hidden;
|
|
115
|
+
text-overflow: ellipsis;
|
|
112
116
|
|
|
113
117
|
&_withIconLeft {
|
|
114
118
|
margin-left: 4px;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
1
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
3
|
|
|
3
4
|
import DropDown from 'src/components/DropDown';
|
|
@@ -19,7 +20,7 @@ const meta: Meta<typeof DropDown> = {
|
|
|
19
20
|
render: ({ ...props }) => (
|
|
20
21
|
<div style={{ width: '300px', height: '500px', padding: '24px' }}>
|
|
21
22
|
<DropDown
|
|
22
|
-
buttonComponent={<MultiActionButton
|
|
23
|
+
buttonComponent={<MultiActionButton rightIcon={IconTypes.CHEVRON_DOWN} text={'Toggle dropdown'} />}
|
|
23
24
|
buttonCallbackName={'onRightClickCallback'}
|
|
24
25
|
title={'Filter on portal status'}
|
|
25
26
|
{...props}
|
|
@@ -4,6 +4,7 @@ import { is } from 'ramda';
|
|
|
4
4
|
|
|
5
5
|
import { ColorTypes, IconTypes, SizeTypes, HierarchyTypes } from 'src/constants';
|
|
6
6
|
|
|
7
|
+
import { Span } from 'src/components/Typography/Typography';
|
|
7
8
|
import Icon from 'src/components/Icon';
|
|
8
9
|
|
|
9
10
|
import styles from './DropDownItem.module.scss';
|
|
@@ -27,6 +28,7 @@ interface Props {
|
|
|
27
28
|
rightIcon?: `${IconTypes}`;
|
|
28
29
|
iconSize?: SizeTypes.SMALL | SizeTypes.MEDIUM | SizeTypes.LARGE;
|
|
29
30
|
iconColor?: `${ColorTypes}`;
|
|
31
|
+
textColor?: `${ColorTypes}`;
|
|
30
32
|
iconClassName?: string;
|
|
31
33
|
}
|
|
32
34
|
|
|
@@ -39,6 +41,7 @@ const DropDownItem: FC<Props> = ({
|
|
|
39
41
|
disabled,
|
|
40
42
|
className,
|
|
41
43
|
iconColor,
|
|
44
|
+
textColor,
|
|
42
45
|
leftIcon,
|
|
43
46
|
rightIcon,
|
|
44
47
|
iconSize,
|
|
@@ -86,7 +89,11 @@ const DropDownItem: FC<Props> = ({
|
|
|
86
89
|
|
|
87
90
|
const getContent = () => {
|
|
88
91
|
if (text) {
|
|
89
|
-
return
|
|
92
|
+
return (
|
|
93
|
+
<Span className={s('text')} color={textColor}>
|
|
94
|
+
{text}
|
|
95
|
+
</Span>
|
|
96
|
+
);
|
|
90
97
|
}
|
|
91
98
|
|
|
92
99
|
return null;
|
|
@@ -82,9 +82,8 @@ $button-s-min-width: 30px;
|
|
|
82
82
|
|
|
83
83
|
.icon {
|
|
84
84
|
margin-left: $base-size;
|
|
85
|
-
height: $icon-
|
|
86
|
-
width: $icon-
|
|
87
|
-
min-width: $icon-medium-size;
|
|
85
|
+
min-height: $icon-small-size;
|
|
86
|
+
min-width: $icon-small-size;
|
|
88
87
|
transition: transform 150ms ease;
|
|
89
88
|
}
|
|
90
89
|
|