Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
Signed-off-by: Max You <[email protected]>
  • Loading branch information
Max You authored and Max You committed May 10, 2024
1 parent 2cf064f commit b297629
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 30 deletions.
5 changes: 2 additions & 3 deletions player/react/src/lib/components/ui-notification.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import React from 'react';
import { CssClasses } from '../types';
import { CssClasses, SendSignal } from '../types';
import {
ToastNotification,
InlineNotification,
NotificationActionButton
} from '@carbon/react';

import { commonSlots, slotsDisabled } from '../common-slots';
import { SendSignal } from '../types';

export interface NotificationState {
id: string,
id: string;
type: string;
lowContrast?: boolean;
hideCloseButton?: boolean;
Expand Down
54 changes: 27 additions & 27 deletions sdk/react/src/lib/fragment-components/a-notification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ export const componentInfo: ComponentInfo = {
image,
codeExport: {
angular: {
latest: {
inputs: ({ json }) => `
latest: {
inputs: ({ json }) => `
@Input() ${nameStringToVariableString(json.codeContext?.name)}notificationObj: any = {
type: "${json.kind}",
title: "${json.title}",
Expand All @@ -214,10 +214,10 @@ export const componentInfo: ComponentInfo = {
: ''
}
};`,
outputs: ({ json }) => `@Output() ${nameStringToVariableString(json.codeContext?.name)}ActionClick = new EventEmitter<any>();`,
imports: ['NotificationModule', 'ButtonModule'],
code: ({ json }) => {
return `${json.variantSelector === 'toastNotification'
outputs: ({ json }) => `@Output() ${nameStringToVariableString(json.codeContext?.name)}ActionClick = new EventEmitter<any>();`,
imports: ['NotificationModule', 'ButtonModule'],
code: ({ json }) => {
return `${json.variantSelector === 'toastNotification'
? `<ibm-toast
${angularClassNamesFromComponentObj(json)}
[notificationObj]="${nameStringToVariableString(json.codeContext?.name)}notificationObj">
Expand All @@ -227,10 +227,10 @@ export const componentInfo: ComponentInfo = {
[notificationObj]="${nameStringToVariableString(json.codeContext?.name)}notificationObj">
</ibm-notification>`
}`;
}
},
v10: {
inputs: ({ json }) => `
}
},
v10: {
inputs: ({ json }) => `
@Input() ${nameStringToVariableString(json.codeContext?.name)}notificationObj: any = {
type: "${json.kind}",
title: "${json.title}",
Expand All @@ -247,10 +247,10 @@ export const componentInfo: ComponentInfo = {
: ''
}
};`,
outputs: ({ json }) => `@Output() ${nameStringToVariableString(json.codeContext?.name)}ActionClick = new EventEmitter<any>();`,
imports: ['NotificationModule', 'ButtonModule'],
code: ({ json }) => {
return `${json.variantSelector === 'toastNotification'
outputs: ({ json }) => `@Output() ${nameStringToVariableString(json.codeContext?.name)}ActionClick = new EventEmitter<any>();`,
imports: ['NotificationModule', 'ButtonModule'],
code: ({ json }) => {
return `${json.variantSelector === 'toastNotification'
? `<ibm-toast
${angularClassNamesFromComponentObj(json)}
[notificationObj]="${nameStringToVariableString(json.codeContext?.name)}notificationObj">
Expand All @@ -260,14 +260,14 @@ export const componentInfo: ComponentInfo = {
[notificationObj]="${nameStringToVariableString(json.codeContext?.name)}notificationObj">
</ibm-notification>`
}`;
}
}
}
}
},
react: {
latest: {
imports: ['ToastNotification','InlineNotification','NotificationActionButton'],
code: ({ json }) => {
return `${json.variantSelector === 'toastNotification'
imports: ['ToastNotification','InlineNotification','NotificationActionButton'],
code: ({ json }) => {
return `${json.variantSelector === 'toastNotification'
? `<ToastNotification
caption="${json.captionText}"
hideCloseButton={${json.hideCloseButton}}
Expand Down Expand Up @@ -308,12 +308,12 @@ export const componentInfo: ComponentInfo = {
})}
${reactClassNamesFromComponentObj(json)} />`
}`;
}
},
v10: {
imports: ['ToastNotification','InlineNotification','NotificationActionButton'],
code: ({ json }) => {
return `${json.variantSelector === 'toastNotification'
}
},
v10: {
imports: ['ToastNotification','InlineNotification','NotificationActionButton'],
code: ({ json }) => {
return `${json.variantSelector === 'toastNotification'
? `<ToastNotification
caption="${json.captionText}"
hideCloseButton={${json.hideCloseButton}}
Expand Down Expand Up @@ -354,8 +354,8 @@ export const componentInfo: ComponentInfo = {
})}
${reactClassNamesFromComponentObj(json)} />`
}`;
}
}
}
}
}
}
};

0 comments on commit b297629

Please sign in to comment.