Skip to content

Commit 9bf08f6

Browse files
fix info banner (#192)
* fix info banner warning variant bg color * fix info banner
1 parent cd06899 commit 9bf08f6

3 files changed

Lines changed: 148 additions & 3 deletions

File tree

webnext/src/shared/defguard-ui/components/Icon/Icon.tsx

Lines changed: 129 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { type CSSProperties, type Ref, useMemo } from 'react';
22
import type { IconKindValue } from './icon-types';
33
import './style.scss';
44
import type { Direction } from '../../types';
5+
import { IconAccessSettings } from './icons/IconAccessSettings';
56
import { IconAndroid } from './icons/IconAndroid';
67
import { IconApple } from './icons/IconApple';
78
import { IconAppStore } from './icons/IconAppstore';
@@ -61,6 +62,10 @@ const mapRotation = (kind: IconKindValue, direction: Direction): number => {
6162
return 0;
6263
};
6364

65+
const EmptyIcon = () => {
66+
return null;
67+
};
68+
6469
// Color should be set by css bcs some icons have different structures like 'loader'
6570
export const Icon = <T extends IconKindValue>({
6671
icon: iconKind,
@@ -131,8 +136,130 @@ export const Icon = <T extends IconKindValue>({
131136
return IconGlobe;
132137
case 'help':
133138
return IconHelp;
134-
default:
135-
throw Error(`Unimplemented icon kind: ${iconKind}`);
139+
case 'access-settings':
140+
return IconAccessSettings;
141+
case 'activity':
142+
return EmptyIcon;
143+
case 'activity-notes':
144+
return EmptyIcon;
145+
case 'add-user':
146+
return EmptyIcon;
147+
case 'analytics':
148+
return EmptyIcon;
149+
case 'archive':
150+
return EmptyIcon;
151+
case 'attention':
152+
return EmptyIcon;
153+
case 'check':
154+
return EmptyIcon;
155+
case 'clear':
156+
return EmptyIcon;
157+
case 'code':
158+
return EmptyIcon;
159+
case 'collapse':
160+
return EmptyIcon;
161+
case 'credit-card':
162+
return EmptyIcon;
163+
case 'date':
164+
return EmptyIcon;
165+
case 'delete':
166+
return EmptyIcon;
167+
case 'deploy':
168+
return EmptyIcon;
169+
case 'devices':
170+
return EmptyIcon;
171+
case 'devices-active':
172+
return EmptyIcon;
173+
case 'download':
174+
return EmptyIcon;
175+
case 'edit':
176+
return EmptyIcon;
177+
case 'enter':
178+
return EmptyIcon;
179+
case 'expand':
180+
return EmptyIcon;
181+
case 'filter':
182+
return EmptyIcon;
183+
case 'gateway':
184+
return EmptyIcon;
185+
case 'gift':
186+
return EmptyIcon;
187+
case 'github':
188+
return EmptyIcon;
189+
case 'groups':
190+
return EmptyIcon;
191+
case 'hamburger':
192+
return EmptyIcon;
193+
case 'info-filled':
194+
return EmptyIcon;
195+
case 'info-outlined':
196+
return EmptyIcon;
197+
case 'location':
198+
return EmptyIcon;
199+
case 'location-preview':
200+
return EmptyIcon;
201+
case 'location-tracking':
202+
return EmptyIcon;
203+
case 'logout':
204+
return EmptyIcon;
205+
case 'mail':
206+
return EmptyIcon;
207+
case 'manage-keys':
208+
return EmptyIcon;
209+
case 'menu':
210+
return EmptyIcon;
211+
case 'minus-circle':
212+
return EmptyIcon;
213+
case 'navigation-collapse':
214+
return EmptyIcon;
215+
case 'navigation-uncollapse':
216+
return EmptyIcon;
217+
case 'notification':
218+
return EmptyIcon;
219+
case 'one-time-password':
220+
return EmptyIcon;
221+
case 'openid':
222+
return EmptyIcon;
223+
case 'pdf':
224+
return EmptyIcon;
225+
case 'pie-chart':
226+
return EmptyIcon;
227+
case 'plus-circle':
228+
return EmptyIcon;
229+
case 'profile':
230+
return EmptyIcon;
231+
case 'protection':
232+
return EmptyIcon;
233+
case 'qr':
234+
return EmptyIcon;
235+
case 'search':
236+
return EmptyIcon;
237+
case 'servers':
238+
return EmptyIcon;
239+
case 'settings':
240+
return EmptyIcon;
241+
case 'sort':
242+
return EmptyIcon;
243+
case 'status-attention':
244+
return EmptyIcon;
245+
case 'status-available':
246+
return EmptyIcon;
247+
case 'status-important':
248+
return EmptyIcon;
249+
case 'support':
250+
return EmptyIcon;
251+
case 'transactions':
252+
return EmptyIcon;
253+
case 'user':
254+
return EmptyIcon;
255+
case 'user-active':
256+
return EmptyIcon;
257+
case 'users':
258+
return EmptyIcon;
259+
case 'webhooks':
260+
return EmptyIcon;
261+
case 'yubi-keys':
262+
return EmptyIcon;
136263
}
137264
}, [iconKind]);
138265

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import type { SVGProps } from 'react';
2+
3+
export const IconAccessSettings = (props: SVGProps<SVGSVGElement>) => {
4+
return (
5+
<svg
6+
xmlns="http://www.w3.org/2000/svg"
7+
width="20"
8+
height="20"
9+
viewBox="0 0 20 20"
10+
fill="none"
11+
{...props}
12+
>
13+
<path
14+
d="M17.5288 12.985V12.475C17.5288 11.265 16.5388 10.275 15.3288 10.275H14.8788C13.6688 10.275 12.6788 11.265 12.6788 12.475V12.985C12.1788 13.255 11.8388 13.775 11.8388 14.375V16.465C11.8388 17.345 12.5488 18.055 13.4288 18.055H16.7788C17.6588 18.055 18.3688 17.345 18.3688 16.465V14.375C18.3688 13.775 18.0288 13.255 17.5288 12.985ZM14.8788 11.775H15.3288C15.7188 11.775 16.0288 12.085 16.0288 12.475V12.785H14.1788V12.475C14.1788 12.085 14.4888 11.775 14.8788 11.775ZM16.8688 16.475C16.8688 16.475 16.8288 16.565 16.7788 16.565H13.4288C13.4288 16.565 13.3388 16.525 13.3388 16.475V14.385C13.3388 14.385 13.3788 14.295 13.4288 14.295H16.7788C16.7788 14.295 16.8688 14.335 16.8688 14.385V16.475ZM10.1888 16.125L10.9888 17.395C10.6488 17.615 10.3388 17.785 10.0888 17.915C9.96877 18.005 9.80877 18.055 9.64877 18.055C9.50877 18.055 9.37877 18.015 9.25877 17.945C7.75877 17.165 5.63877 15.685 4.03877 13.025C1.99877 9.635 1.90877 6.325 2.03877 4.655C2.06877 4.265 2.38877 3.965 2.76877 3.965C3.97877 3.945 5.16877 3.755 6.32877 3.405C7.35877 3.095 8.33877 2.655 9.26877 2.105C9.49877 1.965 9.78877 1.965 10.0288 2.105C10.9688 2.645 11.9688 3.075 13.0088 3.385C14.1588 3.735 15.3588 3.935 16.5688 3.985C16.9488 4.005 17.2688 4.305 17.2888 4.685C17.3888 6.275 17.2188 7.925 16.7988 9.465L15.3488 9.075C15.6688 7.905 15.8188 6.665 15.8088 5.445C14.7188 5.355 13.6288 5.145 12.5788 4.835C11.5688 4.535 10.5988 4.135 9.66877 3.635C8.74877 4.145 7.77877 4.565 6.77877 4.865C5.71877 5.185 4.62877 5.385 3.51877 5.465C3.49877 6.945 3.73877 9.605 5.34877 12.285C6.66877 14.465 8.36877 15.755 9.66877 16.485C9.82877 16.395 10.0188 16.285 10.2088 16.165L10.1888 16.125Z"
15+
fill="#7E8794"
16+
/>
17+
</svg>
18+
);
19+
};

webnext/src/shared/defguard-ui/components/InfoBanner/style.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
max-width: 100%;
5353
overflow: hidden;
5454
text-wrap: wrap;
55-
text-wrap: balance;
5655
text-align: left;
5756
}
5857

0 commit comments

Comments
 (0)