ui: I HATE STYLED-COMPONENTS WITH TYPESCRIPT

This commit is contained in:
Matthew Penner 2021-07-22 11:15:27 -06:00
parent 23de3d68f3
commit 361596e051
40 changed files with 180 additions and 147 deletions

View file

@ -1,6 +1,5 @@
import React from 'react';
import styled, { css } from 'styled-components/macro';
import tw from 'twin.macro';
import tw, { css, styled } from 'twin.macro';
import Spinner from '@/components/elements/Spinner';
interface Props {
@ -95,7 +94,7 @@ const Button: React.FC<ComponentProps> = ({ children, isLoading, ...props }) =>
</ButtonStyle>
);
type LinkProps = Omit<JSX.IntrinsicElements['a'], 'ref' | keyof Props> & Props;
type LinkProps = Omit<JSX.IntrinsicElements['a'], keyof JSX.IntrinsicElements['button'] | keyof Props> & Props;
const LinkButton: React.FC<LinkProps> = props => <ButtonStyle as={'a'} {...props}/>;