
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@keepfy/styleguide
Advanced tools
A repository to center and document, initially, the colors of the Keepfy App.
InstallThe package still in
alpha
$ npm i @keepfy/styleguide
or
$ yarn add @keepfy/styleguide
UsageThe work in progress of the colors documentation is here
Using the ThemeProvider of styled-components, the theme property will be injected into all styled-components below of it.
import { theme } from '@keepfy/styleguide'
import styled, { ThemeProvider as StyledThemeProvider } from 'styled-components'
type Kind = 'critical' | 'medium' | 'high' | 'minimal' | 'low' | 'neutral'
interface IProps {
kind: Kind
children?: React.ReactNode
}
const CardStyled = styled('div')<IProps>(
({ theme, kind }) => ({
padding: '0.5rem',
borderLeft: `4px solid ${ theme.colors.priority[kind].main}`,
backgroundColor: theme.colors.priority[kind].light,
width: '144px',
height: '80px',
margin: '0 1rem 1rem 0',
borderRadius: '4px',
position: 'relative'
})
)
const App = () => (
<StyledThemeProvider theme={ theme }>
<CardStyled kind="critical" />
</StyledThemeProvider>
)
For auto-types of the theme inside of styled components:
Extend the keepfy theme in the default theme of styled-components
// eg.: src/types/styled.ts
import { theme } from '@keepfy/styleguide'
type Theme = typeof theme
declare module 'styled-components' {
export interface DefaultTheme extends Theme {}
}
Don't forget to add it to the typeRoots in tsconfig.json
Eg.: in tsconfig.json
{
"compilerOptions": {
...,
+ "typeRoots": ["./node_modules/@types/", "./src/types/styled.ts", ...]
},
...
}
FAQs
A minimalist styleguide for the keepfy
We found that @keepfy/styleguide demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.