pixel-react 1.1.9 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. package/lib/components/AppHeader/types.d.ts +7 -7
  2. package/lib/components/Drawer/Drawer.stories.d.ts +2 -0
  3. package/lib/components/Drawer/Types.d.ts +11 -0
  4. package/lib/components/Icon/Icon.stories.d.ts +1 -0
  5. package/lib/components/Icon/types.d.ts +1 -0
  6. package/lib/components/Table/Table.d.ts +1 -1
  7. package/lib/components/Table/Table.stories.d.ts +2 -0
  8. package/lib/components/Table/Types.d.ts +16 -0
  9. package/lib/index.d.ts +36 -8
  10. package/lib/index.esm.js +88 -35
  11. package/lib/index.esm.js.map +1 -1
  12. package/lib/index.js +88 -35
  13. package/lib/index.js.map +1 -1
  14. package/package.json +1 -1
  15. package/src/assets/Themes/BaseTheme.scss +3 -0
  16. package/src/assets/Themes/DarkTheme.scss +3 -0
  17. package/src/assets/icons/eye_closed.svg +3 -0
  18. package/src/components/AppHeader/AppHeader.scss +9 -1
  19. package/src/components/AppHeader/AppHeader.stories.tsx +28 -28
  20. package/src/components/AppHeader/AppHeader.tsx +11 -11
  21. package/src/components/AppHeader/types.ts +7 -7
  22. package/src/components/Button/Button.scss +1 -0
  23. package/src/components/Checkbox/Checkbox.tsx +1 -1
  24. package/src/components/Drawer/Drawer.scss +13 -9
  25. package/src/components/Drawer/Drawer.stories.tsx +28 -0
  26. package/src/components/Drawer/Drawer.tsx +29 -6
  27. package/src/components/Drawer/Types.ts +11 -0
  28. package/src/components/Icon/Icon.stories.tsx +27 -0
  29. package/src/components/Icon/Icon.tsx +5 -1
  30. package/src/components/Icon/Icons.scss +13 -2
  31. package/src/components/Icon/iconList.ts +2 -0
  32. package/src/components/Icon/types.ts +1 -0
  33. package/src/components/Modal/Modal.tsx +8 -1
  34. package/src/components/Modal/modal.scss +10 -2
  35. package/src/components/Table/Table.scss +16 -4
  36. package/src/components/Table/Table.stories.tsx +36 -12
  37. package/src/components/Table/Table.tsx +33 -16
  38. package/src/components/Table/Types.ts +121 -105
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.1.9",
4
+ "version": "1.2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",
7
7
  "types": "lib/index.d.ts",
@@ -185,6 +185,8 @@ $base-theme: (
185
185
  in-active-button-color: #808080,
186
186
  button-background-gradient-color: #9c1ebb,
187
187
  details-page-value-color: #808080,
188
+ table-header-text-color: #252c37,
189
+ table-column-text-color: #200624,
188
190
  // TODO:: Need to change the color code values of below 7 color (N/A in DS)
189
191
  ff-machine-input-field-border-color: #f1ebf2,
190
192
  ff-machine-input-field-text-color: #1e161f,
@@ -199,6 +201,7 @@ $base-theme: (
199
201
  ff-delete-button-attachment: #a91224,
200
202
  email-table-border-color: #959595,
201
203
  ff-icon-hover-fill-color: #f7ebff,
204
+ ff-icon-color-dark-variant: #FFFFFF,
202
205
  );
203
206
  :root {
204
207
  @each $key, $value in $base-theme {
@@ -196,9 +196,12 @@ $dark-theme: (
196
196
  ff-app-header-menu-border-bottom-color:#FFFFFF,
197
197
  ff-app-header-submenu-border-bottom-color: linear-gradient(90deg, #592F7C 0%, #741EBB 100%),
198
198
  details-page-value-color: #808080,
199
+ table-header-text-color: #252c37,
200
+ table-column-text-color: #200624,
199
201
  ff-delete-button-attachment: #a91224,
200
202
  email-table-border-color: #959595,
201
203
  ff-icon-hover-fill-color:#F7ECF8,
204
+ ff-icon-color-dark-variant: #FFFFFF,
202
205
  );
203
206
  :root {
204
207
  @each $key, $value in $dark-theme {
@@ -0,0 +1,3 @@
1
+ <svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M14.7651 6.07607C14.9992 6.22242 15.0704 6.5309 14.9241 6.76507C14.485 7.46755 13.9633 8.10658 13.3703 8.66318L14.5713 9.8642C14.7666 10.0595 14.7666 10.376 14.5713 10.5713C14.376 10.7666 14.0595 10.7666 13.8642 10.5713L12.6012 9.30831C11.8051 9.90297 10.909 10.3622 9.93383 10.6512L10.383 12.3278C10.4545 12.5946 10.2962 12.8687 10.0295 12.9402C9.76275 13.0116 9.48858 12.8534 9.41712 12.5866L8.95924 10.8777C8.4875 10.9581 8.00042 11.0001 7.50007 11.0001C6.9997 11.0001 6.51262 10.9581 6.04087 10.8777L5.58303 12.5866C5.51157 12.8533 5.23741 13.0116 4.97068 12.9402C4.70394 12.8687 4.54564 12.5946 4.6171 12.3278L5.06629 10.6512C4.09115 10.3622 3.19506 9.90296 2.39892 9.30829L1.13591 10.5713C0.940646 10.7666 0.624063 10.7666 0.428801 10.5713C0.233539 10.376 0.233539 10.0595 0.428801 9.86419L1.62984 8.66316C1.03683 8.10656 0.515117 7.46754 0.0760684 6.76507C-0.0702873 6.5309 0.000898553 6.22242 0.235066 6.07607C0.469234 5.92971 0.77771 6.0009 0.924065 6.23507C1.40355 7.00224 1.98901 7.68069 2.66235 8.24283C2.67317 8.25109 2.68373 8.25985 2.69399 8.26911C4.009 9.35541 5.65541 10.0001 7.50007 10.0001C10.3079 10.0001 12.6565 8.50643 14.0761 6.23507C14.2224 6.0009 14.5309 5.92971 14.7651 6.07607Z" fill="currentColor"/>
3
+ </svg>
@@ -45,7 +45,7 @@
45
45
  }
46
46
 
47
47
  &--selected {
48
- padding: 3px 6px 3px 3px;
48
+ padding: 3px;
49
49
  background-color: var(--primary-icon-color);
50
50
  border-radius: 20px;
51
51
  .ff-app-header-nav-bar-item-label {
@@ -53,6 +53,13 @@
53
53
  border-radius: 20px;
54
54
  padding: 4px 8px;
55
55
  }
56
+ :last-child{
57
+ margin-right: 3px;
58
+ }
59
+ :first-child {
60
+ margin: 0;
61
+ }
62
+
56
63
  }
57
64
  .ff-app-header-submenu-container {
58
65
  display: flex;
@@ -60,6 +67,7 @@
60
67
  color: var(--ff-header-submenu-text-color);
61
68
  align-content: center;
62
69
  position: relative;
70
+ white-space: nowrap;
63
71
  &:not(.ff-app-header-nav-bar-submenu-item--selected):hover::after {
64
72
  animation: oscillate-border-width 0.5s ease-in-out forwards;
65
73
  }
@@ -28,79 +28,79 @@ const defaultArgs = {
28
28
  };
29
29
 
30
30
  const headerMenuItems = [
31
- { menuLabel: 'Dashboard', menuName: 'Dashboard', subMenuItems: [] },
31
+ { label: 'Dashboard', path: 'Dashboard', subMenuItems: [] },
32
32
  {
33
- menuLabel: 'Repo',
34
- menuName: 'Repo',
33
+ label: 'Repo',
34
+ path: 'Repo',
35
35
  subMenuItems: [
36
36
  {
37
- subMenuLabel: 'Elements',
38
- subMenuName: 'Elements',
37
+ label: 'Elements',
38
+ path: 'Elements',
39
39
  quickMenuItems: [],
40
40
  },
41
41
  {
42
- subMenuLabel: 'Program Elements',
43
- subMenuName: 'Program Elements',
42
+ label: 'Program Elements',
43
+ path: 'Program Elements',
44
44
  quickMenuItems: [],
45
45
  },
46
46
  {
47
- subMenuLabel: 'Step Groups',
48
- subMenuName: 'Step Groups',
47
+ label: 'Step Groups',
48
+ path: 'Step Groups',
49
49
  quickMenuItems: [
50
50
  {
51
51
  quickMenuName: 'Success Icon',
52
- quickMenuIconName: 'success',
52
+ iconName: 'success',
53
53
  },
54
54
  {
55
55
  quickMenuName: 'Warning Icon',
56
- quickMenuIconName: 'warning',
56
+ iconName: 'warning',
57
57
  },
58
58
  {
59
59
  quickMenuName: 'Info Icon',
60
- quickMenuIconName: 'info',
60
+ iconName: 'info',
61
61
  },
62
62
  ],
63
63
  },
64
64
  ],
65
65
  },
66
66
  {
67
- menuLabel: 'Test Data',
68
- menuName: 'Test Data',
67
+ label: 'Test Data',
68
+ path: 'Test Data',
69
69
  subMenuItems: [],
70
70
  },
71
71
  {
72
- menuLabel: 'Test Dev',
73
- menuName: 'Test Dev',
72
+ label: 'Test Dev',
73
+ path: 'Test Dev',
74
74
  subMenuItems: [
75
75
  {
76
- subMenuLabel: 'Scripts',
77
- subMenuName: 'Scripts',
76
+ label: 'Scripts',
77
+ path: 'Scripts',
78
78
  quickMenuItems: [
79
79
  {
80
80
  quickMenuName: 'Delete Icon',
81
- quickMenuIconName: 'delete',
81
+ iconName: 'delete',
82
82
  },
83
83
  {
84
84
  quickMenuName: 'Details Icon',
85
- quickMenuIconName: 'details',
85
+ iconName: 'details',
86
86
  },
87
87
  {
88
88
  quickMenuName: 'Sun Icon',
89
- quickMenuIconName: 'sun_icon',
89
+ iconName: 'sun_icon',
90
90
  },
91
91
  {
92
92
  quickMenuName: 'Moon Stars Icon',
93
- quickMenuIconName: 'moon_stars_icon',
93
+ iconName: 'moon_stars_icon',
94
94
  },
95
95
  {
96
96
  quickMenuName: 'Impact List Icon',
97
- quickMenuIconName: 'impactList',
97
+ iconName: 'impactList',
98
98
  },
99
99
  ],
100
100
  },
101
101
  {
102
- subMenuLabel: 'Executions',
103
- subMenuName: 'Executions',
102
+ label: 'Executions',
103
+ path: 'Executions',
104
104
  quickMenuItems: [],
105
105
  },
106
106
  ],
@@ -132,13 +132,13 @@ export const Controlled: Story = {
132
132
  const [selectedSubMenuItem, setSelectedSubMenuItem] = useState('');
133
133
  const [selectedQuickMenuItem, setSelectedQuickMenuItem] = useState('');
134
134
  const handleMenuClick = (item: appHeaderMenuItemProps) => {
135
- setSelectedMenuItem(item.menuLabel);
135
+ setSelectedMenuItem(item.label);
136
136
  };
137
137
  const handleSubMenuClick = (item: appHeaderSubMenuItemProps) => {
138
- setSelectedSubMenuItem(item.subMenuLabel);
138
+ setSelectedSubMenuItem(item.label);
139
139
  };
140
140
  const handleQuickMenuClick = (item: appHeaderQuickMenuItemProps) => {
141
- setSelectedQuickMenuItem(item.quickMenuIconName);
141
+ setSelectedQuickMenuItem(item.iconName);
142
142
  };
143
143
 
144
144
  return (
@@ -40,9 +40,9 @@ const AppHeader: React.FC<AppHeaderProps> = ({
40
40
  <div
41
41
  className={classNames('ff-app-header-nav-bar-item', {
42
42
  ['ff-app-header-nav-bar-item--selected']:
43
- menuItem.menuLabel === selectedMenu,
43
+ menuItem.label === selectedMenu,
44
44
  })}
45
- key={menuItem.menuLabel}
45
+ key={menuItem.label}
46
46
  onClick={() => onMenuClick(menuItem)}
47
47
  >
48
48
  <Typography
@@ -50,14 +50,14 @@ const AppHeader: React.FC<AppHeaderProps> = ({
50
50
  className="ff-app-header-nav-bar-item-label"
51
51
  lineHeight="18px"
52
52
  >
53
- {menuItem.menuLabel}
53
+ {menuItem.label}
54
54
  </Typography>
55
- {menuItem.menuLabel === selectedMenu &&
55
+ {menuItem.label === selectedMenu &&
56
56
  menuItem?.subMenuItems &&
57
57
  menuItem.subMenuItems.map((subMenuItem) => {
58
58
  return (
59
59
  <div
60
- key={subMenuItem.subMenuLabel}
60
+ key={subMenuItem.label}
61
61
  onClick={() => onSubMenuClick(subMenuItem)}
62
62
  className="ff-app-header-submenu-container"
63
63
  >
@@ -67,14 +67,14 @@ const AppHeader: React.FC<AppHeaderProps> = ({
67
67
  'ff-app-header-nav-bar-submenu-item',
68
68
  {
69
69
  ['ff-app-header-nav-bar-submenu-item--selected']:
70
- subMenuItem.subMenuLabel === selectedSubMenu,
70
+ subMenuItem.label === selectedSubMenu,
71
71
  }
72
72
  )}
73
73
  lineHeight="18px"
74
74
  >
75
- {subMenuItem.subMenuLabel}
75
+ {subMenuItem.label}
76
76
  </Typography>
77
- {subMenuItem.subMenuLabel === selectedSubMenu &&
77
+ {subMenuItem.label === selectedSubMenu &&
78
78
  subMenuItem?.quickMenuItems && (
79
79
  <div className="ff-app-header-quickmenu-container">
80
80
  <div>
@@ -85,7 +85,7 @@ const AppHeader: React.FC<AppHeaderProps> = ({
85
85
  return (
86
86
  <>
87
87
  <div
88
- key={quickMenuItem.quickMenuIconName}
88
+ key={quickMenuItem.iconName}
89
89
  onClick={() =>
90
90
  onQuickMenuClick(quickMenuItem)
91
91
  }
@@ -93,14 +93,14 @@ const AppHeader: React.FC<AppHeaderProps> = ({
93
93
  'ff-app-header-nav-bar-quickmenu-item',
94
94
  {
95
95
  ['ff-app-header-nav-bar-quickmenu-item--selected']:
96
- quickMenuItem.quickMenuName ===
96
+ quickMenuItem.path ===
97
97
  selectedQuickMenu,
98
98
  }
99
99
  )}
100
100
  >
101
101
  <Icon
102
102
  name={
103
- quickMenuItem.quickMenuIconName
103
+ quickMenuItem.iconName
104
104
  }
105
105
  height={24}
106
106
  width={24}
@@ -15,17 +15,17 @@ export interface AppHeaderProps {
15
15
  onQuickMenuClick?: (text: any) => void;
16
16
  }
17
17
  export interface appHeaderMenuItemProps {
18
- menuLabel: string;
19
- menuName?: string;
18
+ label: string;
19
+ path?: string;
20
20
  subMenuItems?: appHeaderSubMenuItemProps[];
21
21
  }
22
22
  export interface appHeaderSubMenuItemProps {
23
- subMenuLabel: string;
24
- subMenuName?: string;
23
+ label: string;
24
+ path?: string;
25
25
  quickMenuItems?: appHeaderQuickMenuItemProps[];
26
26
  }
27
27
  export interface appHeaderQuickMenuItemProps {
28
- quickMenuLabel?: string;
29
- quickMenuName?: string;
30
- quickMenuIconName: string;
28
+ label?: string;
29
+ path?: string;
30
+ iconName: string;
31
31
  }
@@ -125,6 +125,7 @@
125
125
  @extend .fontXs;
126
126
  font-weight: 500;
127
127
  padding: 4.5px 8px;
128
+ line-height: 15px;
128
129
  }
129
130
 
130
131
  &--medium {
@@ -53,7 +53,7 @@ const Checkbox: React.FC<CheckboxProps> = ({
53
53
  />
54
54
  )}
55
55
  </span>
56
- <Typography as="label">{label}</Typography>
56
+ <Typography as="span">{label}</Typography>
57
57
  </label>
58
58
  );
59
59
  };
@@ -12,6 +12,7 @@
12
12
  position: fixed;
13
13
  right: 0;
14
14
  bottom: 0;
15
+ top: 80px;
15
16
  min-width: 450px;
16
17
  background-color: var(--primary-button-text-color);
17
18
  z-index: 999;
@@ -94,23 +95,21 @@
94
95
  justify-content: center;
95
96
  border-radius: 8px;
96
97
  }
98
+ .ff-custom-header {
99
+ background-color: var(--drawer-footer-bg);
100
+ padding: 4px 8px;
101
+ }
97
102
  }
98
103
  }
99
104
  }
100
105
 
101
106
  .ff-drawer-body {
102
107
  background-color: var(--drawer-footer-bg);
103
- height: calc(100vh - 76px);
104
- overflow: hidden auto;
105
- }
106
-
107
- .no-footer {
108
- height: 100vh;
108
+ overflow-y: auto;
109
109
  }
110
110
 
111
111
  .ff-drawer-footer {
112
- height: 24px;
113
- position: absolute;
112
+ position: fixed;
114
113
  bottom: 0;
115
114
  left: 0;
116
115
  right: 0;
@@ -118,11 +117,16 @@
118
117
  display: flex;
119
118
  justify-content: space-between;
120
119
  border-top: 1px solid var(--drawer-footer-border);
120
+ z-index: 1000;
121
121
 
122
122
  .button-container {
123
123
  display: flex;
124
124
  justify-content: flex-end;
125
- gap: 10px;
125
+ gap: 8px;
126
+ }
127
+ .ff-custom-footer {
128
+ background-color: var(--drawer-footer-bg);
129
+ padding: 4px 8px;
126
130
  }
127
131
  }
128
132
  }
@@ -98,6 +98,34 @@ export const WithCustomFooter: Story = {
98
98
  docs: { disable: true },
99
99
  },
100
100
  };
101
+ export const WithTertiaryButtons: Story = {
102
+ args: {
103
+ ...defaultArgs,
104
+ tertiaryButtonProps: {
105
+ left: {
106
+ label: 'Help',
107
+ onClick: () => {},
108
+ },
109
+ right: {
110
+ label: 'More Info',
111
+ onClick: () => {},
112
+ },
113
+ },
114
+ },
115
+ parameters: {
116
+ docs: { disable: true },
117
+ },
118
+ };
119
+
120
+ export const WithCustomZIndex: Story = {
121
+ args: {
122
+ ...defaultArgs,
123
+ zIndex: 1050,
124
+ },
125
+ parameters: {
126
+ docs: { disable: true },
127
+ },
128
+ };
101
129
 
102
130
  export const Controlled: Story = {
103
131
  render: () => {
@@ -30,6 +30,8 @@ const Drawer: FC<DrawerProps> = ({
30
30
  onCloseIconClick,
31
31
  customHeader,
32
32
  customFooter,
33
+ tertiaryButtonProps = { left: {}, right: {} },
34
+ zIndex = 999,
33
35
  }: DrawerProps) => {
34
36
  const [isExpanded, setIsExpanded] = useState(_isExpanded);
35
37
 
@@ -72,11 +74,16 @@ const Drawer: FC<DrawerProps> = ({
72
74
  className={classNames('ff-drawer', `ff-drawer--${drawerSize}`, {
73
75
  'ff-drawer--open': isOpen,
74
76
  })}
77
+ style={{ zIndex }}
75
78
  >
76
79
  {showHeader && (
77
- <div className="ff-drawer-header">
80
+ <div
81
+ className={classNames('ff-drawer-header', {
82
+ 'ff-custom-header': customHeader,
83
+ })}
84
+ >
78
85
  {customHeader ? (
79
- customHeader
86
+ <div className="ff-custom-header">{customHeader}</div>
80
87
  ) : (
81
88
  <div className="ff-drawer-action-section">
82
89
  <div className="ff-action-button">
@@ -106,9 +113,7 @@ const Drawer: FC<DrawerProps> = ({
106
113
  className="ff-expand-collapse-button"
107
114
  onClick={onClose}
108
115
  >
109
- {backButtonIcon ? (
110
- backButtonIcon
111
- ) : (
116
+ {backButtonIcon || (
112
117
  <Icon
113
118
  name="error"
114
119
  height={16}
@@ -146,7 +151,11 @@ const Drawer: FC<DrawerProps> = ({
146
151
  </div>
147
152
 
148
153
  {isFooterRequired && (
149
- <div className="ff-drawer-footer">
154
+ <div
155
+ className={classNames('ff-drawer-footer', {
156
+ 'ff-custom-footer': customFooter,
157
+ })}
158
+ >
150
159
  {customFooter || footerContent || (
151
160
  <>
152
161
  <div className="button-container">
@@ -166,8 +175,22 @@ const Drawer: FC<DrawerProps> = ({
166
175
  transparentBackground={true}
167
176
  />
168
177
  )}
178
+ {tertiaryButtonProps.left?.label && (
179
+ <Button
180
+ {...tertiaryButtonProps.left}
181
+ variant="tertiary"
182
+ transparentBackground={true}
183
+ />
184
+ )}
169
185
  </div>
170
186
  <div className="button-container">
187
+ {tertiaryButtonProps.right?.label && (
188
+ <Button
189
+ {...tertiaryButtonProps.right}
190
+ variant="tertiary"
191
+ transparentBackground={true}
192
+ />
193
+ )}
171
194
  {secondaryButtonProps.label && (
172
195
  <Button
173
196
  {...secondaryButtonProps}
@@ -109,4 +109,15 @@ export interface DrawerProps {
109
109
  * If provided, this will render in place of the default footer.
110
110
  */
111
111
  customFooter?: ReactNode;
112
+ /**
113
+ * Tertiary button properties (optional)
114
+ */
115
+ tertiaryButtonProps?: {
116
+ left?: BtnPropsCommon;
117
+ right?: BtnPropsCommon;
118
+ };
119
+ /**
120
+ * Custom z-index for the drawer
121
+ */
122
+ zIndex?: number;
112
123
  }
@@ -6,6 +6,12 @@ const meta: Meta<typeof Icon> = {
6
6
  title: 'Components/Icon',
7
7
  component: Icon,
8
8
  tags: ['autodocs'],
9
+ argTypes: {
10
+ variant: {
11
+ control: { type: 'select' },
12
+ options: ['light', 'dark'],
13
+ },
14
+ },
9
15
  };
10
16
 
11
17
  type Story = StoryObj<typeof Icon>;
@@ -34,4 +40,25 @@ export const AllIcons: Story = {
34
40
  },
35
41
  };
36
42
 
43
+ export const DarkVariantIcons: Story = {
44
+ args: {
45
+ name: 'hamburger_menu',
46
+ color: 'var(--ff-icon-color-dark-variant)',
47
+ variant: 'dark',
48
+ hoverEffect: true,
49
+ },
50
+ render: (args) => {
51
+ const backgroundColor = args.variant === 'dark' ? '#000' : '#fff';
52
+ const iconColor = args.variant === 'dark' ? 'var(--ff-icon-color-dark-variant)' : 'var(--brand-color)';
53
+
54
+ return (
55
+ <div style={{ backgroundColor, padding: '20px' }}>
56
+ <Icon {...args} color={iconColor} height={16} width={16} />
57
+ </div>
58
+ );
59
+ },
60
+ };
61
+
62
+
63
+
37
64
  export default meta;
@@ -15,6 +15,7 @@ const Icon = forwardRef<HTMLSpanElement, IconProps>(
15
15
  hoverEffect = false,
16
16
  className = '',
17
17
  disabled = false,
18
+ variant = "light",
18
19
  ...props
19
20
  },
20
21
  ref
@@ -28,6 +29,8 @@ const Icon = forwardRef<HTMLSpanElement, IconProps>(
28
29
  return null;
29
30
  }
30
31
 
32
+ const iconColor = variant === "dark" ? 'var(--ff-icon-color-dark-variant)' : color;
33
+
31
34
  return (
32
35
  <span
33
36
  ref={ref}
@@ -36,11 +39,12 @@ const Icon = forwardRef<HTMLSpanElement, IconProps>(
36
39
  className={classNames('ff-icon-container', {
37
40
  'ff-icon-click': !!hoverEffect,
38
41
  'ff-icon-disabled': disabled,
42
+ 'ff-icon-dark': variant === "dark",
39
43
  [className]: !!className,
40
44
  })}
41
45
  {...props}
42
46
  >
43
- <IconComponent height="100%" width="100%" style={{ color: color }} />
47
+ <IconComponent height="100%" width="100%" style={{ color: iconColor }} />
44
48
  </span>
45
49
  );
46
50
  }
@@ -1,13 +1,24 @@
1
-
2
1
  .ff-icon-container {
3
2
  display: flex;
4
3
  justify-content: center;
5
4
  align-items: center;
5
+ padding: 4px;
6
+ &.ff-icon-dark {
7
+ background-color: var(--brand-color);
8
+ &.ff-icon-click {
9
+ &:hover {
10
+ border-radius: 4px;
11
+ background-color: white;
12
+ svg path {
13
+ fill: var(--brand-color);
14
+ }
15
+ }
16
+ }
17
+ }
6
18
  }
7
19
 
8
20
  .ff-icon-click {
9
21
  cursor: pointer;
10
- padding: 4px;
11
22
  box-sizing: content-box;
12
23
  &:hover {
13
24
  border-radius: 4px;
@@ -113,6 +113,7 @@ import NotificationIcon from '../../assets/icons/notification_icon.svg?react';
113
113
  import NLPHelpIcon from '../../assets/icons/nlp_help_icon.svg?react';
114
114
  import UpdateIcon from '../../assets/icons/update_icon.svg?react';
115
115
  import AddFile from '../../assets/icons/add_file.svg?react';
116
+ import EyeClosed from '../../assets/icons/eye_closed.svg?react';
116
117
 
117
118
  import CloneIcon from '../../assets/icons/clone_icon.svg?react';
118
119
  import MoveIcon from '../../assets/icons/move_icon.svg?react';
@@ -236,5 +237,6 @@ Components['linked_defects'] = LinkedDefects;
236
237
  Components['no_access_icon'] = NoAccessIcon;
237
238
  Components['full_access_icon'] = FullAccessIcon;
238
239
  Components['view_access_icon'] = ViewAccessIcon;
240
+ Components['eye_closed'] = EyeClosed;
239
241
 
240
242
  export default Components;
@@ -7,4 +7,5 @@ export interface IconProps {
7
7
  onClick?: (data?: any) => void;
8
8
  hoverEffect?: boolean;
9
9
  disabled?: boolean;
10
+ variant?: "dark" | "light";
10
11
  }
@@ -3,6 +3,7 @@ import { createPortal } from 'react-dom';
3
3
  import './modal.scss';
4
4
  import { ModalProps } from './types';
5
5
  import { ThemeContext } from '../ThemeProvider/ThemeProvider';
6
+ import classNames from 'classnames';
6
7
 
7
8
  const Modal: React.FC<ModalProps> = ({
8
9
  isOpen,
@@ -54,7 +55,13 @@ const Modal: React.FC<ModalProps> = ({
54
55
  onClick={shouldCloseOnOverlayClick ? onClose : undefined}
55
56
  >
56
57
  <div
57
- className={`ff-modal-content ${currentTheme} ${contentClassName || ''}`}
58
+ className={classNames(
59
+ `ff-modal-content ${currentTheme} ${contentClassName}`,
60
+ {
61
+ 'modal-bottom-border': !isFooterDisplayed,
62
+ 'modal-top-border': !isHeaderDisplayed,
63
+ }
64
+ )}
58
65
  style={{ width: customWidth, height: customHeight }}
59
66
  onClick={(e) => e.stopPropagation()}
60
67
  aria-label={contentLabel}
@@ -15,7 +15,6 @@
15
15
  background: var(--ff-mini-modal-border);
16
16
  position: relative;
17
17
  max-width: 100%;
18
- border-radius: 12px;
19
18
  padding: 8px;
20
19
 
21
20
  .ff-modal-header {
@@ -24,6 +23,15 @@
24
23
  }
25
24
  }
26
25
 
26
+ .modal-bottom-border {
27
+ border-bottom-left-radius: 12px;
28
+ border-bottom-right-radius: 12px;
29
+ }
30
+ .modal-top-border {
31
+ border-top-left-radius: 12px;
32
+ border-top-right-radius: 12px;
33
+ }
34
+
27
35
  .ff-modal-footer {
28
36
  background-color: var(--expandable-menu-option-bg);
29
37
  max-width: 100%;
@@ -35,5 +43,5 @@
35
43
  justify-content: end;
36
44
  align-items: center;
37
45
  gap: 8px;
38
- padding: 4px 16px;
46
+ padding: 4px 8px;
39
47
  }