Gathering detailed insights and metrics for @iampava-devtools-ds/themes
Gathering detailed insights and metrics for @iampava-devtools-ds/themes
Gathering detailed insights and metrics for @iampava-devtools-ds/themes
Gathering detailed insights and metrics for @iampava-devtools-ds/themes
npm install @iampava-devtools-ds/themes
Typescript
Module System
Node Version
NPM Version
60.6
Supply Chain
87.2
Quality
75.3
Maintenance
100
Vulnerability
100
License
TypeScript (82.1%)
MDX (7.18%)
JavaScript (6.69%)
CSS (3.39%)
HTML (0.64%)
Total Downloads
684
Last Day
1
Last Week
1
Last Month
9
Last Year
152
253 Stars
163 Commits
15 Forks
5 Watching
5 Branches
8 Contributors
Minified
Minified + Gzipped
Latest Version
1.2.5
Package Id
@iampava-devtools-ds/themes@1.2.5
Unpacked Size
82.37 kB
Size
15.38 kB
File Count
36
NPM Version
lerna/3.22.1/node@v18.13.0+arm64 (darwin)
Node Version
18.13.0
Publised On
21 Sept 2023
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
-66.7%
1
Compared to previous week
Last month
12.5%
9
Compared to previous month
Last year
-71.4%
152
Compared to previous year
3
1
Each of the UI components in this project contains themes for multiple browsers. These themes are built using the postcss-themed package, which allows us to specify themes for multiple browsers in light and dark mode.
This package contains colors, types, and React utilities for using browser themes.
1npm i @iampava-devtools-ds/themes 2# or with yarn 3yarn add @iampava-devtools-ds/themes
You can use the ThemeProvider
component to set the theme for all @iampava-devtools-ds
components underneath it.
1import { ThemeProvider } from "@iampava-devtools-ds/themes"; 2 3<ThemeProvider theme={"chrome"} colorScheme={"light"}> 4 <YourApp /> 5</ThemeProvider>;
We also provide an AutoThemeProvider
, which will automatically set the theme and color scheme of @iampava-devtools-ds
components based on the users browser and preferred color scheme.
1<AutoThemeProvider> 2 <div id="my-app"> 3 <ObjectInspector /> 4 </div> 5</AutoThemeProvider>
You can always override the AutoThemeProvider
like a normal ThemeProvider
.
1<AutoThemeProvider theme="firefox"> 2 <div id="my-app"> 3 <ObjectInspector /> 4 </div> 5</AutoThemeProvider>
You can also have the AutoThemeProvider
automatically change the background color and text color to match the current browser and color scheme. In dark mode, this means the background color will be the browser's dark background and light text.
1<AutoThemeProvider autoStyle> 2 <div id="my-app"> 3 <ObjectInspector /> 4 </div> 5</AutoThemeProvider>
If you want to build your own component that leverages the ThemeProvider
, we have a hook that allows you to get the current theme.
1import { useTheme } from "@iampava-devtools-ds/themes"; 2 3const { currentTheme, currentColorScheme } = useTheme( 4 { theme, colorScheme }, 5 styles 6);
We have created a number of theme variables that have the common colors for different browsers. These are stored as JS objects. You can view the available variables in the Browser Themes
story in Storybook.
1import { chrome, firefox } from "@iampava-devtools-ds/themes"; 2 3chrome.light.gray01; 4firefox.dark.blue02;
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 3/19 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
126 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-12-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More