fix: removed `TAMAGUI_TARGET` in scripts

This seems set in our vite config so going through vite should allow us
to skip it explicitly being set.
This commit is contained in:
Rickard Andersson 2023-08-04 10:45:47 +03:00
parent fc5f5f5fe4
commit ee25c431ed
3 changed files with 19 additions and 22 deletions

View File

@ -3,7 +3,7 @@
"private": true,
"version": "0.0.0",
"scripts": {
"dev": "NODE_ENV=development TAMAGUI_TARGET=web vite",
"dev": "NODE_ENV=development vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",

View File

@ -1,27 +1,26 @@
import React from 'react';
import './button.css';
import './button.css'
interface ButtonProps {
/**
* Is this the principal call to action on the page?
*/
primary?: boolean;
primary?: boolean
/**
* What background color to use
*/
backgroundColor?: string;
backgroundColor?: string
/**
* How large should the button be?
*/
size?: 'small' | 'medium' | 'large';
size?: 'small' | 'medium' | 'large'
/**
* Button contents
*/
label: string;
label: string
/**
* Optional click handler
*/
onClick?: () => void;
onClick?: () => void
}
/**
@ -34,7 +33,7 @@ export const Button = ({
label,
...props
}: ButtonProps) => {
const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary';
const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary'
return (
<button
type="button"
@ -44,5 +43,5 @@ export const Button = ({
>
{label}
</button>
);
};
)
}

View File

@ -1,17 +1,15 @@
import React from 'react';
import { Button } from './Button';
import './header.css';
import { Button } from './Button'
import './header.css'
type User = {
name: string;
};
name: string
}
interface HeaderProps {
user?: User;
onLogin: () => void;
onLogout: () => void;
onCreateAccount: () => void;
user?: User
onLogin: () => void
onLogout: () => void
onCreateAccount: () => void
}
export const Header = ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => (
@ -53,4 +51,4 @@ export const Header = ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps
</div>
</div>
</header>
);
)