Options
All
  • Public
  • Public/Protected
  • All
Menu

StyleSystem can register and manage additional CSS styles for modules. It can scope CSS so it will do not affect others.

Note: UserInterfaceSystem is for JSX (HTML) vs. StyleSystem is for CSS styles

collboard-system

Hierarchy

  • AbstractSystem
    • StyleSystem

Index

Constructors

  • new StyleSystem(systems: ISystemsExtended): StyleSystem
  • Parameters

    • systems: ISystemsExtended

    Returns StyleSystem

Properties

WithSkin: (__namedParameters: { content: any }) => Element

Type declaration

    • (__namedParameters: { content: any }): Element
    • Renders content with the current skin

      Parameters

      • __namedParameters: { content: any }
        • content:function
          • content(skin: ISkin): Element
          • Parameters

            Returns Element

      Returns Element

WithSkinContext: (__namedParameters: { children?: ReactNode }) => Element

Type declaration

    • (__namedParameters: { children?: ReactNode }): Element
    • Creates context for providing skin

      You want to probbably use WithSkin Use always and only for wrapping content in ReactDOM.render(<styleSystem.WithSkinContext>...</styleSystem.WithSkinContext>)

      Parameters

      • __namedParameters: { children?: ReactNode }
        • Optional children?: ReactNode

      Returns Element

_WithSkin: any
_WithSkinContext: any
colorScheme: BehaviorSubject<ColorScheme>
globalStyles: any
initEmbedStyle: any
ready: Promise<void>

Promise which is resolved when the system is initialized and ready to use.

skin: ReplaySubject<ISkin>
skins: any
styleForEmbedRegistration: any
systems: ISystemsExtended

Accessors

  • get isDestroyed(): boolean
  • Is this object destroyed?

    Returns boolean

  • get isReady(): boolean
  • Checks if the system is initialized and ready to use.

    Returns boolean

Methods

  • addSubdestroyable(...subdestroyable: ITeardownLogic[]): StyleSystem
  • Binds new registration with itself. This registration/destroyable will be destroyed with this.

    Parameters

    • Rest ...subdestroyable: ITeardownLogic[]

    Returns StyleSystem

  • checkIsReady(): void
  • Checks if the system is initialized and ready to use. If not, throws an error. If it is, do nothing.

    Returns void

  • checkWhetherNotDestroyed(errorMessage?: string, runBeforeError?: () => void): void
  • Checks, whether the object is not destroyed

    Parameters

    • Optional errorMessage: string

      Message that will replace default one before error

    • Optional runBeforeError: () => void

      Callback runed before error is thrown; typically this can be some logging

        • (): void
        • Returns void

    Returns void

  • destroy(): Promise<void>
  • Returns Promise<void>

  • init(): Promise<void>
  • Returns Promise<void>

  • registerGlobalStyle(style: string): Registration
  • TODO: Enable object-like styles + styled components in future TODO: Create scoped version of this

    Parameters

    • style: string

    Returns Registration

  • registerSkin(__namedParameters: { priority?: number; skin: ISkin }): Registration
  • Parameters

    • __namedParameters: { priority?: number; skin: ISkin }
      • Optional priority?: number
      • skin: ISkin

    Returns Registration

  • renderStyles(): Element
  • Returns Element

  • isDestroyable(obj: any): obj is IDestroyable
  • Chcek whether the given object is destroyable

    Parameters

    • obj: any

    Returns obj is IDestroyable