web/src/components/form/Button.astro

37 lines · 722 bytes

 1---
 2
 3const {
 4  text,
 5  url,
 6  className,
 7  title,
 8} = Astro.props;
 9
10---
11
12<div class={`button ${className || ''}`} title={title}>
13  <a href={url}>{text}<slot /></a>
14</div>
15
16<style lang="scss">
17  .button {
18    font-family: "Lekton", sans-serif;
19    text-align: center;
20    border: 1px solid var(--box-outline);
21    box-shadow: 3px 3px 0 var(--box-outline);
22    background: var(--accent);
23    border-radius: 18px;
24    padding: 0.5rem 1rem;
25    transition: all 0.2s ease-in-out;
26    &:hover {
27      box-shadow: 4px 4px 0 var(--box-outline);
28    }
29    a {
30      text-decoration: none;
31      color: var(--accent-fg);;
32      font-size: 1.2rem;
33      font-family: "Lekton", sans-serif;
34      font-weight: bold;
35    }
36  }
37</style>