web/src/components/form/Button.astro
29 lines · 684 bytes
1---
2const { text, url, className, title, target, rel } = Astro.props;
3---
4
5<div class={`button ${className || ''}`} title={title}>
6 <a href={url} target={target} rel={rel}>{text}<slot /></a>
7</div>
8
9<style lang="scss">
10 .button {
11 font-family: var(--font-subtitle);
12 text-align: center;
13 border: var(--border-light);
14 box-shadow: var(--shadow-sm);
15 background: var(--accent);
16 border-radius: var(--curve-pill);
17 padding: var(--space-sm) var(--space-md);
18 transition: var(--transition-normal);
19 &:hover {
20 box-shadow: var(--shadow-sm-hover);
21 }
22 a {
23 text-decoration: none;
24 color: var(--accent-fg);
25 font-size: var(--text-md);
26 font-weight: bold;
27 }
28 }
29</style>