Skip to content

Commit

Permalink
type: Fix type issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Mar 16, 2022
1 parent d1ff9ba commit 8fa5fbf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions main.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

export type ColorScheme = 'light' | 'dark';
export type ColorSchemeChangeEvent = CustomEvent<{ colorScheme: ColorScheme }>;
export type PermanentColorSchemeEvent = CustomEvent<{ colorScheme: ColorScheme, permanent: boolean }>;

export class DarkMode extends HTMLElement {
mode?: ColorScheme;
/**
Expand All @@ -18,7 +18,6 @@ export class DarkMode extends HTMLElement {
* Any string value that represents the label for the "light" mode.
*/
light?: string;
style?: React.CSSProperties;
}

declare global {
Expand Down Expand Up @@ -51,7 +50,9 @@ declare global {
}
namespace JSX {
interface IntrinsicElements {
'dark-mode': DarkMode;
'dark-mode': DarkMode | {
style?: Partial<CSSStyleDeclaration>;
};
}
}
}

0 comments on commit 8fa5fbf

Please sign in to comment.