Registry API Reference
The Registry is a centralized system that manages component configurations and themes across your React Native application. It provides a single source of truth for storing and accessing component styles, variants, and other customization options.
ThemeRegistry API Reference
Section titled “ThemeRegistry API Reference”Method | Parameters | Return Type | Description |
---|---|---|---|
registerPreset | name: string , config: ThemeConfigFunction | void | Adds a new theme preset configuration |
getPreset | name: string | ThemeConfigFunction | undefined | Retrieves a registered preset by name |
getAllPresets | - | string[] | Returns all registered preset names |
hasPreset | name: string | boolean | Checks if a preset exists in registry |
deletePreset | name: string | void | Removes a preset from the registry |
clearPresets | - | void | Clears all registered presets |
Type Definitions
Section titled “Type Definitions”type ThemeConfigFunction = (isDark: boolean) => Partial<Theme>;