Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@madlan145/emotion-monkey
Advanced tools
Manage emotion instances with React contexts mechanism.
Manage emotion instances with React context mechanism.
You probably don't need to use this. Please refer to create-emotion for use-cases.
Using single emotion
instance works almost everytime. However when you need to have multiple instances of emotion, you may face issues with storing and managing them.
Monkeys will come to the rescue! 🙉
npm i @madlan145/emotion-monkey -S
In you app's entry point:
import { EmotionProvider } from '@madlan145/emotion-monkey';
import createEmotion from 'create-emotion';
const emotion = createEmotion({});
const App: React.SFC<{}> = () => (
<EmotionProvider emotion={emotion}>
<Component label="Label 🐒" />
</EmotionProvider>
);
Having EmotionProvider, you can use styled
as you would normally use it with react-emotion
.
To use css & other stuff from emotion
:
import { Emotion } from 'create-emotion';
import { injectEmotion } from '@madlan145/emotion-monkey';
const stylesheet = ({ css }: Emotion) => ({
redButton: css`
color: red;
`,
container: css`
padding: 15px;
`,
});
interface ComponentProps {
styles: ReturnType<typeof stylesheet>;
label: string;
}
const Component: React.SFC<ComponentProps> = ({ styles, label }) => (
<div className={styles.container}>
<button className={styles.redButton}>{label}</button>
</div>
);
export default injectEmotion(stylesheet)(Component);
FAQs
Manage emotion instances with React contexts mechanism.
The npm package @madlan145/emotion-monkey receives a total of 2 weekly downloads. As such, @madlan145/emotion-monkey popularity was classified as not popular.
We found that @madlan145/emotion-monkey demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 23 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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.