persona-community-5/.pnpm-store/v3/files/ab/5a460954998f362a37930770503a3e949c2ad5e7fa75b33f97086deae530be247e11035b4ac38cd5814e75a2a624c6d0fda0b0e1dcf605b1204005e9687aef
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

16 lines
559 B
Plaintext

import { styleHookSingleton } from './hook';
/**
* create a Component to add styles on demand
* - styles are added when first instance is mounted
* - styles are removed when the last instance is unmounted
* - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior
*/
export const styleSingleton = () => {
const useStyle = styleHookSingleton();
const Sheet = ({ styles, dynamic }) => {
useStyle(styles, dynamic);
return null;
};
return Sheet;
};