
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
colors-show
Advanced tools
Present your application colors with style.
yarn add colors-show
// or
npm install colors-show
First, you have to import the component
import ColorsShow from 'colors-show';
Lets say, you have some color guides in your application:
export const green = {
Green: '#00a757',
Dark_Green: '#00904b',
Light_Green: '#05d073',
Dimmed_Green: '#7fd3ab',
};
export const blue = {
Blue: '#378cbe',
Dark_Blue: '#367fa9',
Light_Blue: '#4cade6',
Dimmed_Blue: '#9bc5de',
};
Simplest example:
<ColorsShow colors={green} />
You're all set! Now let's see how can you customize this component:
colors
- object
/ required - Map of colors where key
is a name and value is a color in CSS one of css formats.
width
- number
/ 100
- width of the box.
height
- number
/ 100
- height of the box.
space
- number
/ 20
- space between boxes.
lines
- bool
/ false
- if you want lines insted of boxes.
stacked
- bool
/ false
stacked boxed with hover effect.
name
- string
/ ""
- group name.
showNames
- bool
/ false
- you can turn it off to show only color codes.
containerClassName
- string
/ ""
- additional class for container.
wrapperClassName
- string
/ ""
- additional class for wrapper.
boxClassName
- string
/ ""
- additional class for box.
colorInfoClassName
- string
/ ""
- additional class for color info.
component
- React.Component
/ null
- custom Box component.
You can use your own component to presnt colors. You can extend Box
component from colors-show
or use your own.
const Circle = styled(Box)`
border-radius: 100px;
display: flex;
justify-content: center;
align-items: center;
`;
In both cases component will get few props:
width
height
space
stacked
className
style
= { backgroundColor: COLOR }
As you can see there is option to provide additional CSS classes for all elements. Lets look at component structure:
<Container> // containerClassName
<Name /> // wrapperClassName
<Boxes>
<Box> // boxClassName
<ColorInfo> // colorInfoClassName
<span>code</span>
<span>name</span>
</ColorInfo>
</Box>
</Boxes>
</Container>
FAQs
Present your application colors with style.
The npm package colors-show receives a total of 0 weekly downloads. As such, colors-show popularity was classified as not popular.
We found that colors-show 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.