Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

reactstyleloaddecorator

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

reactstyleloaddecorator

```tsx import { cd, sl, sv } from 'reactstyleloaddecorator' ```

  • 1.0.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source
import { cd, sl, sv } from 'reactstyleloaddecorator'

#USAGE

###Like decorator for React Component:

@cd(() => require('./MyComponent.scss'))
export class MyComponent extends React.Component<IProps, IState> {
    render(c?) {
        return (
            <div className={c('container')}>MyComponent</div>
        )
    }
}

###Like style import:

export const MyFunction = function({}:IMyFunctionProps) {
    const c = sl(() => require('./MyFunction.scss'));

    return (
        <div className={c('container')}>MyFunction</div>
    )
};

###Getter for computed property from css:

.my-div-class {
  padding: 5px;
}
const paddingLeft = sv('padding-left', /*[optional]*/'.my-div-class');

FAQs

Package last updated on 07 Aug 2020

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

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