New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@potok/theme

Package Overview
Dependencies
Maintainers
5
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@potok/theme - npm Package Compare versions

Comparing version 0.6.3 to 0.7.0-alpha.15efb380

6

components/PotokThemeProvider.jsx

@@ -19,4 +19,6 @@ // @flow

*/
const PotokThemeProvider = ({ appearance, device, children }: Props) => (
<ThemeProvider theme={{ appearance, device }}>{children}</ThemeProvider>
const PotokThemeProvider = ({ appearance, device, color, children }: Props) => (
<ThemeProvider theme={{ appearance, device, color }}>
{children}
</ThemeProvider>
);

@@ -23,0 +25,0 @@

import { css } from 'styled-components';
import themed from './lib/themed';
import { appearances } from './lib/theme';
import { default as themed, themedColors } from './lib/themed';
import { appearances, colors as themeColors } from './lib/theme';
export { default as colors } from './lib/colors';
export { themedColors as colors } from './lib/colors';
export { default as PotokThemeProvider } from './components/PotokThemeProvider';

@@ -7,0 +7,0 @@ export {

@@ -1,4 +0,11 @@

export default {
import _ from 'lodash';
import { colors as colorThemes } from './theme';
const themedPalette = {
// Primary colors
B500: '#26bdfc', // base blue
B500: {
[colorThemes.default]: '#26bdfc', // base blue
[colorThemes.recruitmentAgency]: '#5649f2',
},
G500: '#0ce0ad', // base green

@@ -29,1 +36,9 @@ R500: '#ff5a6e', // base red

};
export const themedColors = Object.keys(themedPalette).reduce((acc, key) => {
acc[key] = (props: ThemeProps) => {
const theme = _.get(props, 'theme.color') || 'default';
return _.get(themedPalette, [key, theme]) || _.get(themedPalette, key);
};
return acc;
}, {});

@@ -11,4 +11,9 @@ export const appearances = {

export const colors = {
default: 'default',
recruitmentAgency: 'recruitmentAgency',
};
const theme = {};
export default theme;
// @flow
import { appearances, devices } from './theme';
import { appearances, devices, colors } from './theme';
export type ThemeAppearance = $Values<appearances>;
export type ThemeDevice = $Values<devices>;
export type Theme = { appearance: ThemeAppearance, device: ThemeDevice };
export type ThemeColor = $Values<colors>;
export type Theme = {
appearance: ThemeAppearance,
device: ThemeDevice,
color: ThemeColor,
};
export type ThemeProps = { theme: Theme };
{
"name": "@potok/theme",
"version": "0.6.3",
"version": "0.7.0-alpha.15efb380",
"description": "Potok.io UI Kit Theme package",

@@ -5,0 +5,0 @@ "main": "./index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc