aboutsummaryrefslogtreecommitdiff
path: root/components/ui.tsx
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-04-17 17:24:59 +0200
committerlonkaars <l.leblansch@gmail.com>2021-04-17 17:24:59 +0200
commitdd77d6bb276f6a70b36f69d11cde7f5c8995f5e1 (patch)
tree89c5dd428459b38a07ad637efcad48cf7e870a6e /components/ui.tsx
parentb33439e75d4b22a0c68b5cb56851b518a5ea7db7 (diff)
home page without inline react styles :tada:
Diffstat (limited to 'components/ui.tsx')
-rw-r--r--components/ui.tsx21
1 files changed, 3 insertions, 18 deletions
diff --git a/components/ui.tsx b/components/ui.tsx
index 99479a8..db858a4 100644
--- a/components/ui.tsx
+++ b/components/ui.tsx
@@ -30,6 +30,7 @@ export function Button(props: {
children?: ReactNode;
style?: CSSProperties;
href?: string;
+ className?: string;
onclick?: (() => void);
id?: string;
}) {
@@ -37,26 +38,10 @@ export function Button(props: {
onClick={props.onclick}
href={props.href}
id={props.id}
- style={{
- padding: props.text ? 8 : 16,
- textAlign: props.text ? 'center' : 'left',
- borderRadius: 8,
- backgroundColor: 'var(--disk-a)',
- cursor: 'pointer',
- position: 'relative',
- textDecoration: 'none',
- display: 'block',
- userSelect: 'none',
- ...props.style,
- }}
+ className={"button pad-s round-t " + props.className}
>
{props.text
- ? <span
- style={{
- fontWeight: 600,
- userSelect: 'none',
- }}
- >
+ ? <span>
{props.text}
</span>
: undefined}