InfoBar component is a status bar that appears at the bottom of the editor, providing theme selection controls and using the statusbar colors from the current theme.
Usage
Features
- Fixed height status bar (28px)
- Dynamically styled with current theme’s statusbar colors
- Contains ThemeSelector component
- Adapts background and foreground colors based on active theme
Props
The InfoBar component doesn’t accept any props. It uses theuseEditor() hook to access the current theme configuration.
Context Dependencies
Complete theme configuration object with statusbar and body color definitions
Implementation
src/components/info-bar.tsx
Styling
The InfoBar uses inline styles to apply theme colors dynamically:- Outer container: Uses
currentTheme.body.bgbackground - Inner bar: Uses
currentTheme.statusbar.bgandcurrentTheme.statusbar.fgfor background and text color - Text size: 11px for compact display
- Padding: 2px horizontal spacing
Theme Integration
The statusbar colors are defined in each theme configuration:- Dark theme: Blue background (#007acc)
- GitHub Dark: Green background (#238636)
- Dracula: Purple/gray background (#6272a4)
- One Dark Pro: Purple background (#c678dd)
Related
- ThemeSelector - Theme dropdown component
- Theme System - Theme configuration and colors
- EditorContext - State management integration