@@ -3,46 +3,46 @@ import { ReactNode } from "react";
33import { styled } from "styled-components" ;
44
55type ContainerProps = {
6- type : "warning" | "error" ;
7- inverse ?: boolean ;
6+ $ type : "warning" | "error" ;
7+ $ inverse ?: boolean ;
88} ;
99
10- const getBackgroundColor = ( { type, inverse } : ContainerProps ) : string => {
11- if ( ! inverse ) {
10+ const getBackgroundColor = ( { $ type, $ inverse } : ContainerProps ) : string => {
11+ if ( ! $ inverse) {
1212 return "var(--vscode-notifications-background)" ;
1313 }
1414
15- switch ( type ) {
15+ switch ( $ type) {
1616 case "warning" :
1717 return "var(--vscode-editorWarning-foreground)" ;
1818 case "error" :
1919 return "var(--vscode-debugExceptionWidget-border)" ;
2020 }
2121} ;
2222
23- const getTextColor = ( { type, inverse } : ContainerProps ) : string => {
24- if ( ! inverse ) {
23+ const getTextColor = ( { $ type, $ inverse } : ContainerProps ) : string => {
24+ if ( ! $ inverse) {
2525 return "var(--vscode-editor-foreground)" ;
2626 }
2727
28- switch ( type ) {
28+ switch ( $ type) {
2929 case "warning" :
3030 return "var(--vscode-editor-background)" ;
3131 case "error" :
3232 return "var(--vscode-list-activeSelectionForeground)" ;
3333 }
3434} ;
3535
36- const getBorderColor = ( { type } : ContainerProps ) : string => {
37- switch ( type ) {
36+ const getBorderColor = ( { $ type } : ContainerProps ) : string => {
37+ switch ( $ type) {
3838 case "warning" :
3939 return "var(--vscode-editorWarning-foreground)" ;
4040 case "error" :
4141 return "var(--vscode-editorError-foreground)" ;
4242 }
4343} ;
4444
45- const getTypeText = ( type : ContainerProps [ "type" ] ) : string => {
45+ const getTypeText = ( type : ContainerProps [ "$ type" ] ) : string => {
4646 switch ( type ) {
4747 case "warning" :
4848 return "Warning" ;
@@ -108,7 +108,7 @@ export const Alert = ({
108108 role,
109109} : Props ) => {
110110 return (
111- < Container type = { type } inverse = { inverse } role = { role } >
111+ < Container $ type= { type } $ inverse= { inverse } role = { role } >
112112 < Title >
113113 { getTypeText ( type ) } : { title }
114114 </ Title >
0 commit comments