use gpui::{Div, Hsla, IntoElement, ParentElement, Styled, div, px, transparent_black};
use crate::styles::palette;
pub fn focus_ring(content: impl IntoElement, focused: bool, color: Hsla) -> Div {
let ring_color = if focused { color } else { transparent_black() };
div()
.rounded_lg()
.border_2()
.border_color(ring_color)
.p(px(2.))
.child(content)
}
pub fn focus_ring_primary(content: impl IntoElement, focused: bool) -> Div {
focus_ring(content, focused, palette::primary(500))
}
pub fn focus_ring_error(content: impl IntoElement, focused: bool) -> Div {
focus_ring(content, focused, palette::danger(500))
}