use crate::diag::SourceResult;
use crate::engine::Engine;
use crate::foundations::{elem, Content, Packed, Show, StyleChain};
use crate::text::{TextElem, WeightDelta};
#[elem(title = "Strong Emphasis", keywords = ["bold", "weight"], Show)]
pub struct StrongElem {
#[default(300)]
pub delta: i64,
#[required]
pub body: Content,
}
impl Show for Packed<StrongElem> {
#[typst_macros::time(name = "strong", span = self.span())]
fn show(&self, _: &mut Engine, styles: StyleChain) -> SourceResult<Content> {
Ok(self
.body()
.clone()
.styled(TextElem::set_delta(WeightDelta(self.delta(styles)))))
}
}