generated from layer5io/layer5-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(components): Add missing ramda package
Signed-off-by: Antonette Caldwell <[email protected]>
- Loading branch information
1 parent
16f917f
commit 253874d
Showing
5 changed files
with
18 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
import { SistentThemeBase } from '../types/SistentTheme'; | ||
import { ShadeType, SistentTheme, SistentThemeBase } from '../types/SistentTheme'; | ||
|
||
export function primaryShade(theme: SistentThemeBase) { | ||
/* | ||
export function primaryShade(theme: SistentThemeBase): (colorScheme?: 'light' | 'dark') => typeof ShadeType { | ||
return (colorScheme?: 'light' | 'dark') => { | ||
if (typeof theme.primaryShade === 'number') { | ||
return theme.primaryShade; | ||
// You can return a default ShadeType value here if needed | ||
return '0' as unknown as typeof ShadeType; // or any other default value from ShadeType | ||
} | ||
return theme.primaryShade[colorScheme || theme.colorScheme]; | ||
// Use a type assertion here to tell TypeScript that you know it's safe | ||
return (theme.primaryShade as unknown as { [key in 'light' | 'dark']: typeof ShadeType })[colorScheme ?? theme.colorScheme]; | ||
}; | ||
} | ||
*/ | ||
|
||
export function primaryShade(theme: SistentTheme, colorScheme: SistentThemeColors) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters