GetStateStyle returns the appropriate style for an app state.
(state AppState)
| 227 | |
| 228 | // GetStateStyle returns the appropriate style for an app state. |
| 229 | func GetStateStyle(state AppState) lipgloss.Style { |
| 230 | switch state { |
| 231 | case StateRunning: |
| 232 | return StateRunningStyle |
| 233 | case StatePaused: |
| 234 | return StatePausedStyle |
| 235 | case StateComplete: |
| 236 | return StateCompleteStyle |
| 237 | case StateError: |
| 238 | return StateErrorStyle |
| 239 | case StateStopped: |
| 240 | return StateStoppedStyle |
| 241 | default: |
| 242 | return StateReadyStyle |
| 243 | } |
| 244 | } |
| 245 | |
| 246 | // GetActivityStyle returns the appropriate style for activity line based on state. |
| 247 | func GetActivityStyle(state AppState) lipgloss.Style { |
no outgoing calls
no test coverage detected