pixel-react 1.0.0 → 1.0.1
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/.yarn/install-state.gz +0 -0
- package/README.md +60 -10
- package/lib/index.esm.js +15 -13
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +15 -13
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/assets/styles/_colors.scss +3 -1
- package/src/components/Select/components/Dropdown/Dropdown.tsx +7 -3
- package/src/components/Tooltip/Tooltip.scss +0 -1
- package/src/index.ts +2 -2
- package/ui-library.zip +0 -0
package/package.json
CHANGED
@@ -76,6 +76,8 @@ $default-color: #747474;
|
|
76
76
|
|
77
77
|
///!-----------------------------------------------------------------------------------------------------
|
78
78
|
|
79
|
+
|
80
|
+
|
79
81
|
$description-text: #d9d9d9;
|
80
82
|
$ff-success: #079455;
|
81
83
|
$ff-warning: #f79009;
|
@@ -140,6 +142,6 @@ $file-details-bg: #ffffff;
|
|
140
142
|
--add-icon-hover-color: #{$add-icon-hover-color}; // TODO: Change the color variable name
|
141
143
|
--arrows-button-border-color: #{$arrows-button-border-color}; // TODO: Change the color variable name
|
142
144
|
--arrow-button-bg-color: #{$arrow-button-bg-color}; // TODO: Change the color variable name
|
143
|
-
--text-bg-highlight
|
145
|
+
--text-bg-highlight:#{$text-bg-highlight};
|
144
146
|
--slider-table-color: #{$slider-table-color};
|
145
147
|
}
|
@@ -1,10 +1,12 @@
|
|
1
|
-
import { useRef } from 'react';
|
1
|
+
import { useContext, useRef } from 'react';
|
2
2
|
import { DropDownListProps, dropdownDefaultCSSData } from './dropdownTypes';
|
3
3
|
import useClickOutside from '../../../../hooks/useClickOutside';
|
4
4
|
import { checkEmpty } from '../../../../utils/checkEmpty/checkEmpty';
|
5
5
|
import './Dropdown.scss';
|
6
6
|
import Typography from '../../../Typography';
|
7
7
|
import ffid from '../../../../utils/ffID/ffid';
|
8
|
+
import { ThemeContext } from '../../../ThemeProvider/ThemeProvider';
|
9
|
+
import classNames from 'classnames';
|
8
10
|
|
9
11
|
const Dropdown = ({
|
10
12
|
onSelectBlur,
|
@@ -14,6 +16,8 @@ const Dropdown = ({
|
|
14
16
|
optionZIndex = 100,
|
15
17
|
inputRef,
|
16
18
|
}: DropDownListProps) => {
|
19
|
+
const themeContext = useContext(ThemeContext);
|
20
|
+
const currentTheme = themeContext?.currentTheme;
|
17
21
|
const optionsWrapperRef = useRef<HTMLDivElement>(null);
|
18
22
|
useClickOutside(optionsWrapperRef, onSelectBlur, [inputRef]);
|
19
23
|
|
@@ -55,7 +59,7 @@ const Dropdown = ({
|
|
55
59
|
ref={optionsWrapperRef}
|
56
60
|
// inline css required due to multiple overlay scenarios are present
|
57
61
|
style={updateDropdownPosition()}
|
58
|
-
className=
|
62
|
+
className={classNames('ff-select-options-wrapper', currentTheme)}
|
59
63
|
>
|
60
64
|
{!checkEmpty(options) ? (
|
61
65
|
options.map((option) => (
|
@@ -63,7 +67,7 @@ const Dropdown = ({
|
|
63
67
|
key={ffid()}
|
64
68
|
as="div"
|
65
69
|
lineHeight="30px"
|
66
|
-
className=
|
70
|
+
className={classNames('ff-select-option', currentTheme)}
|
67
71
|
color="var(--ff-select-text-color)"
|
68
72
|
onClick={() => onSelectOptionSelector(option)}
|
69
73
|
>
|
package/src/index.ts
CHANGED
@@ -15,7 +15,7 @@ import Select from './components/Select/Select';
|
|
15
15
|
import TextArea from './components/TextArea';
|
16
16
|
|
17
17
|
import MenuOption from './components/MenuOption';
|
18
|
-
import Table from './components/Table';
|
18
|
+
import Table from './components/Table/Table';
|
19
19
|
|
20
20
|
import AddResourceButton from './components/AddResourceButton';
|
21
21
|
import DonutChart from './components/Charts/DonutChart';
|
@@ -35,7 +35,7 @@ import TableTree from './components/TableTree';
|
|
35
35
|
import Tabs from './components/Tabs';
|
36
36
|
import HighlightText from './components/HighlightText';
|
37
37
|
import Checkbox from './components/Checkbox';
|
38
|
-
import Search from './components/Search'
|
38
|
+
import Search from './components/Search/Search'
|
39
39
|
|
40
40
|
// Utils imports
|
41
41
|
import { checkEmpty } from './utils/checkEmpty/checkEmpty';
|
package/ui-library.zip
DELETED
Binary file
|