Socket
Book a DemoInstallSign in
Socket

react-exclude-props

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-exclude-props

Extend a component with extra properties in a way that typescript can understand. These extra properties are not actually passed down, so don't trigger warnings, but can be used in `styled-components` to modify the element's style.

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

react-exclude-props

Extend a component with extra properties in a way that typescript can understand. These extra properties are not actually passed down, so don't trigger warnings, but can be used in styled-components to modify the element's style.

Usage

import excludeProps from 'react-exclude-props';

const Button = excludeProps('button', p => ({active: p<boolean>()}));
const StyledButton = styled(Button)`
  color: ${props => props.active ? 'green' : 'black'};
`;

export default StyledButton;

FAQs

Package last updated on 02 Apr 2018

Did you know?

Socket

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.

Install

Related posts