
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
comet-ui-kit
Advanced tools
comet-ui-kit is a library of [React](https://reactjs.org/) components built with [styled-components](https://www.styled-components.com/).
comet-ui-kit is a library of React components built with styled-components.
Install dependencies
yarn add comet-ui-kit react-spring styled-components polished
yarn add --dev @types/styled-components
Use <CometThemeProvider />
with no props at the root of your app so that you get automatic
theme switching out of the box. Or you may pass the theme
props as "auto" | "light" | "dark".
Optionally, you may also use <CometGlobalStyles />
.
If you are using Next.js, you
should use <CometThemeProvider />
in your _app.tsx
or Layout file.
// index.tsx
import React from 'react';
import {
CometThemeProvider,
Button,
CometGlobalStyles,
CometToastContainer,
COMET_GLOBAL_FONT_HREF,
} from 'comet-ui-kit';
export const MyApp = () => {
// Get theme properties
const theme = useTheme();
const color = theme.comet.color.text.accent;
return (
<CometThemeProvider>
<Head>
<link rel="stylesheet" href={COMET_GLOBAL_FONT_HREF} />
</Head>
<CometGlobalStyles /> {/* Option */}
<h1 style={{ color: color }}>My cool app</h1>
<Button variant="primary" size="country">
Click here!
</Button>
<CometToastContainer />{' '}
{/* Put this somewhere near the root of your app if you are going to use toasts */}
</CometThemeProvider>
);
};
// styled.tsx
import { Text } from 'comet-ui-kit';
import { rem } from 'polished';
import styled from 'styled-components';
export const TextExample = styled(Text)`
font-size: ${({ theme }) => rem(theme.comet.size.room)};
@media (min-width: ${rem(720)}) {
font-size: ${({ theme }) => rem(theme.comet.size.street)};
}
`;
Add a definitions file like the following anywhere in your project.
// DefaultTheme.d.ts
import 'styled-components';
import { CometThemeProvider } from 'comet-ui-kit';
declare module 'styled-components' {
export interface DefaultTheme extends CometThemeProvider {}
}
When you push your branch to remote ones, please run yarn lint --fix
to comply to the code
convention.
When you add a new library, please make sure its license is not
GPL. And please use -D
for @types.
FAQs
comet-ui-kit is a library of [React](https://reactjs.org/) components built with [styled-components](https://www.styled-components.com/).
The npm package comet-ui-kit receives a total of 1 weekly downloads. As such, comet-ui-kit popularity was classified as not popular.
We found that comet-ui-kit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.