@bitrise/bitkit 10.11.0 → 10.12.0-alpha-export-new-notification.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/package.json +1 -1
- package/src/Components/Notification/Notification.tsx +4 -2
- package/src/index.ts +3 -0
- package/src/old.ts +0 -3
- package/src/tsconfig.tsbuildinfo +1 -1
- package/src/Old/Notification/Notification.css +0 -34
- package/src/Old/Notification/Notification.test.tsx +0 -33
- package/src/Old/Notification/Notification.tsx +0 -69
- package/src/Old/Notification/__snapshots__/Notification.test.tsx.snap +0 -78
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitrise/bitkit",
|
|
3
3
|
"description": "Bitrise React component library",
|
|
4
|
-
"version": "10.
|
|
4
|
+
"version": "10.12.0-alpha-export-new-notification.1",
|
|
5
5
|
"repository": "git@github.com:bitrise-io/bitkit.git",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"license": "UNLICENSED",
|
|
@@ -15,7 +15,9 @@ import CloseButton from '../CloseButton/CloseButton';
|
|
|
15
15
|
import ColorButton, { ColorButtonProps } from '../ColorButton/ColorButton';
|
|
16
16
|
import Icon, { TypeIconName } from '../Icon/Icon';
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
type NotificationStatus = 'info' | 'error' | 'success' | 'warning' | 'progress';
|
|
19
|
+
|
|
20
|
+
const STATUSES: Record<NotificationStatus, { colorScheme: ColorScheme; defaultIcon: ReactNode }> = {
|
|
19
21
|
info: { colorScheme: 'blue', defaultIcon: <Icon name="Info" /> },
|
|
20
22
|
error: { colorScheme: 'red', defaultIcon: <Icon name="ErrorGeneral" /> },
|
|
21
23
|
success: { colorScheme: 'green', defaultIcon: <Icon name="Tick" /> },
|
|
@@ -35,7 +37,7 @@ export type ActionProps = { label: string; href?: string; onClick?: () => void }
|
|
|
35
37
|
'as' | 'onClick' | 'colorScheme'
|
|
36
38
|
>;
|
|
37
39
|
export interface NotificationProps extends Omit<AlertProps, 'status' | 'colorScheme' | 'onClose'> {
|
|
38
|
-
status:
|
|
40
|
+
status: NotificationStatus;
|
|
39
41
|
onClose?: () => void;
|
|
40
42
|
action?: ActionProps;
|
|
41
43
|
iconName?: TypeIconName;
|
package/src/index.ts
CHANGED
|
@@ -152,6 +152,9 @@ export {
|
|
|
152
152
|
typedDropdown,
|
|
153
153
|
} from './Components/Dropdown/Dropdown';
|
|
154
154
|
|
|
155
|
+
export type { NotificationProps } from './Components/Notification/Notification';
|
|
156
|
+
export { default as Notification } from './Components/Notification/Notification';
|
|
157
|
+
|
|
155
158
|
export { BREAKPOINTS } from './Foundations/Breakpoints/Breakpoints';
|
|
156
159
|
|
|
157
160
|
export type { AccordionProps } from './Components/Accordion/Accordion';
|
package/src/old.ts
CHANGED
|
@@ -51,9 +51,6 @@ export { default as InputLabel } from './Old/Input/InputLabel';
|
|
|
51
51
|
export type { Props as LogoProps } from './Old/Logo/Logo';
|
|
52
52
|
export { default as Logo } from './Old/Logo/Logo';
|
|
53
53
|
|
|
54
|
-
export type { Props as NotificationProps } from './Old/Notification/Notification';
|
|
55
|
-
export { default as Notification } from './Old/Notification/Notification';
|
|
56
|
-
|
|
57
54
|
export type { Props as ProgressBarProps } from './Old/Progress/ProgressBar';
|
|
58
55
|
export { default as ProgressBar } from './Old/Progress/ProgressBar';
|
|
59
56
|
|