1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use swc_core::{common::Span, ecma::ast::*};

pub struct ExternalStyle {
    pub expr: Expr,
    pub identifier: Ident,
    pub is_global: bool,
}

pub struct LocalStyle {
    pub hash: String,
    pub css: String,
    pub css_span: Span,
    pub is_dynamic: bool,
    #[allow(clippy::vec_box)]
    pub expressions: Vec<Box<Expr>>,
}

pub enum JSXStyle {
    Local(LocalStyle),
    External(ExternalStyle),
}