Añade componentes para enlaces
This commit is contained in:
parent
dda666e889
commit
075c546fd5
7 changed files with 338 additions and 81 deletions
|
|
@ -5,11 +5,10 @@ pub const PARAGRAPH_COMPONENT: &str = "pagetop::component::paragraph";
|
|||
pub enum ParagraphDisplay {
|
||||
XxLarge,
|
||||
Large,
|
||||
MediumPlus,
|
||||
Normal,
|
||||
Medium,
|
||||
Small,
|
||||
XxSmall,
|
||||
Normal,
|
||||
}
|
||||
|
||||
pub struct Paragraph {
|
||||
|
|
@ -123,18 +122,14 @@ impl Paragraph {
|
|||
|
||||
pub fn alter_display(&mut self, display: ParagraphDisplay) -> &mut Self {
|
||||
self.display = display;
|
||||
self.classes.alter(
|
||||
match &self.display() {
|
||||
ParagraphDisplay::XxLarge => "fs-1",
|
||||
ParagraphDisplay::Large => "fs-2",
|
||||
ParagraphDisplay::MediumPlus => "fs-3",
|
||||
ParagraphDisplay::Normal => "",
|
||||
ParagraphDisplay::Medium => "fs-4",
|
||||
ParagraphDisplay::Small => "fs-5",
|
||||
ParagraphDisplay::XxSmall => "fs-6",
|
||||
},
|
||||
ClassesOp::SetDefault
|
||||
);
|
||||
self.classes.alter(match &self.display() {
|
||||
ParagraphDisplay::XxLarge => "fs-2",
|
||||
ParagraphDisplay::Large => "fs-3",
|
||||
ParagraphDisplay::Medium => "fs-4",
|
||||
ParagraphDisplay::Small => "fs-5",
|
||||
ParagraphDisplay::XxSmall => "fs-6",
|
||||
ParagraphDisplay::Normal => "",
|
||||
}, ClassesOp::SetDefault);
|
||||
self
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue