Raxol. UI. StyleHelper
(Raxol v2.6.0)
View Source
Shared style/theme merging for UI components.
Consolidates the repeated pattern of merging context theme, component theme, component-specific theme styles, and inline styles that was duplicated across 11+ component render/2 functions.
Summary
Functions
Merges theme and style for a component render pass.
Merges theme/style and applies focus styling if the component is focused.
Functions
Merges theme and style for a component render pass.
Precedence (lowest to highest):
- Context theme (from parent/app)
- Component-specific theme styles (via
Theme.component_style/2) - Component's inline
state.style
Returns the merged base style map.
Merges theme/style and applies focus styling if the component is focused.
Combines merge_component_styles/3 with FocusHelper.maybe_focus_style/3.