Add sizez to buttons
This commit is contained in:
parent
ca8e4438bc
commit
1bb3f373c3
@ -39,5 +39,37 @@
|
|||||||
|
|
||||||
.button {
|
.button {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
|
&.button--size-tiny {
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.button--size-small {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.button--size-medium {
|
||||||
|
font-size: 16px;
|
||||||
|
|
||||||
|
@container (max-width: 500px) {
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.button--size-large {
|
||||||
|
font-size: 24px;
|
||||||
|
|
||||||
|
@container (max-width: 500px) {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.button--size-extra-large {
|
||||||
|
font-size: 32px;
|
||||||
|
|
||||||
|
@container (max-width: 500px) {
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,6 +14,13 @@ const component_arguments = {
|
|||||||
variant: new ComponentArguments.Enum(button_variants),
|
variant: new ComponentArguments.Enum(button_variants),
|
||||||
text: new ComponentArguments.ShortText(),
|
text: new ComponentArguments.ShortText(),
|
||||||
href: new ComponentArguments.ShortText(),
|
href: new ComponentArguments.ShortText(),
|
||||||
|
size: new ComponentArguments.Enum([
|
||||||
|
"tiny",
|
||||||
|
"small",
|
||||||
|
"medium",
|
||||||
|
"large",
|
||||||
|
"extra-large",
|
||||||
|
]).setDefaultValue("medium"),
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
} as const;
|
} as const;
|
||||||
@ -37,7 +44,13 @@ export class Buttons extends Component<typeof component_arguments> {
|
|||||||
...classes,
|
...classes,
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
{buttons.map((b) => button({ ...b, text: insert_nbsp(b.text) }))}
|
{buttons.map((b) =>
|
||||||
|
button({
|
||||||
|
...b,
|
||||||
|
text: insert_nbsp(b.text),
|
||||||
|
classes: [`button--size-${b.size}`],
|
||||||
|
})
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user