hook.d.ts 516 B

1234567891011121314151617181920212223
  1. /**
  2. * creates a style on demand
  3. */
  4. declare type StyleSingletonHook = (
  5. /**
  6. * styles to create
  7. */
  8. styles: string,
  9. /**
  10. * indication that styles should be reapplied on change
  11. */
  12. isDynamic?: boolean) => void;
  13. /**
  14. * creates a hook to control style singleton
  15. * @see {@link styleSingleton} for a safer component version
  16. * @example
  17. * ```tsx
  18. * const useStyle = styleHookSingleton();
  19. * ///
  20. * useStyle('body { overflow: hidden}');
  21. */
  22. export declare const styleHookSingleton: () => StyleSingletonHook;
  23. export {};