pixel-react 1.0.4 → 1.0.5

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,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.4",
4
+ "version": "1.0.5",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",
7
7
  "types": "lib/index.d.ts",
@@ -12,14 +12,11 @@ const StateDropdown = ({
12
12
  isOnlyReviewer = false,
13
13
  userHasOnlyViewAccess = false,
14
14
  }: StateDropdownProps) => {
15
- let currentState=value.toUpperCase();
15
+ let currentState = value.toUpperCase();
16
16
  let content;
17
17
  let options;
18
18
  const isReviewerAndClickedOnReviewState: boolean =
19
- isReviewer &&
20
- !isApprovePage &&
21
- currentState === 'REVIEW' &&
22
- !nodeObj;
19
+ isReviewer && !isApprovePage && currentState === 'REVIEW' && !nodeObj;
23
20
  let selectedOption: { label: string; value: string } = {
24
21
  label: '',
25
22
  value: '',
@@ -101,12 +98,13 @@ const StateDropdown = ({
101
98
  ];
102
99
  }
103
100
 
104
- let handleSelectedOption:(value:string)=>{label:string,value:string}=(value)=>{
105
- return {label:value , value: value};
101
+ let handleSelectedOption: (value: string) => {
102
+ label: string;
103
+ value: string;
104
+ } = (value) => {
105
+ return { label: value, value: value };
106
106
  };
107
- if (currentState === 'REVIEW' && isApprovePage) {
108
- selectedOption = handleSelectedOption(value);
109
- } else if (currentState === 'REVIEW' && !isApprovePage) {
107
+ if (currentState === 'REVIEW') {
110
108
  selectedOption = handleSelectedOption(value);
111
109
  } else if (currentState === 'NEW' && !isApprovePage) {
112
110
  selectedOption = handleSelectedOption(value);
@@ -171,10 +169,7 @@ const StateDropdown = ({
171
169
  showBorder={true}
172
170
  />
173
171
  );
174
- } else if (
175
- currentState === 'REJECTED' &&
176
- userHasOnlyViewAccess
177
- ) {
172
+ } else if (currentState === 'REJECTED' && userHasOnlyViewAccess) {
178
173
  content = (
179
174
  <Select
180
175
  label={value}
@@ -199,7 +194,7 @@ const StateDropdown = ({
199
194
  />
200
195
  );
201
196
  } else {
202
- content = '';
197
+ content = '';
203
198
  }
204
199
 
205
200
  return (
package/src/index.ts CHANGED
@@ -37,6 +37,7 @@ import HighlightText from './components/HighlightText';
37
37
  import Checkbox from './components/Checkbox';
38
38
  import Search from './components/Search/Search';
39
39
  import StateDropdown from './components/StateDropdown';
40
+ import AddButton from './components/AddButton';
40
41
 
41
42
  // Utils imports
42
43
  import { checkEmpty } from './utils/checkEmpty/checkEmpty';
@@ -84,6 +85,7 @@ export {
84
85
  Search,
85
86
  StateDropdown,
86
87
  StatusButton,
88
+ AddButton,
87
89
 
88
90
 
89
91
  // utils exports