pixel-react 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pixel-react",
3
3
  "description": "Great for pixel-perfect, design-focused components in React",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",
7
7
  "types": "lib/index.d.ts",
@@ -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: #{$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="ff-select-options-wrapper"
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="ff-select-option"
70
+ className={classNames('ff-select-option', currentTheme)}
67
71
  color="var(--ff-select-text-color)"
68
72
  onClick={() => onSelectOptionSelector(option)}
69
73
  >
@@ -1,4 +1,3 @@
1
- @import '../../assets/styles/colors';
2
1
  @import '../../assets/styles/fonts';
3
2
 
4
3
  .ff-tooltip-container {
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