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:
parent
fc5f5f5fe4
commit
ee25c431ed
|
@ -3,7 +3,7 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "NODE_ENV=development TAMAGUI_TARGET=web vite",
|
"dev": "NODE_ENV=development vite",
|
||||||
"build": "tsc && vite build",
|
"build": "tsc && vite build",
|
||||||
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
|
|
|
@ -1,27 +1,26 @@
|
||||||
import React from 'react';
|
import './button.css'
|
||||||
import './button.css';
|
|
||||||
|
|
||||||
interface ButtonProps {
|
interface ButtonProps {
|
||||||
/**
|
/**
|
||||||
* Is this the principal call to action on the page?
|
* Is this the principal call to action on the page?
|
||||||
*/
|
*/
|
||||||
primary?: boolean;
|
primary?: boolean
|
||||||
/**
|
/**
|
||||||
* What background color to use
|
* What background color to use
|
||||||
*/
|
*/
|
||||||
backgroundColor?: string;
|
backgroundColor?: string
|
||||||
/**
|
/**
|
||||||
* How large should the button be?
|
* How large should the button be?
|
||||||
*/
|
*/
|
||||||
size?: 'small' | 'medium' | 'large';
|
size?: 'small' | 'medium' | 'large'
|
||||||
/**
|
/**
|
||||||
* Button contents
|
* Button contents
|
||||||
*/
|
*/
|
||||||
label: string;
|
label: string
|
||||||
/**
|
/**
|
||||||
* Optional click handler
|
* Optional click handler
|
||||||
*/
|
*/
|
||||||
onClick?: () => void;
|
onClick?: () => void
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -34,7 +33,7 @@ export const Button = ({
|
||||||
label,
|
label,
|
||||||
...props
|
...props
|
||||||
}: ButtonProps) => {
|
}: ButtonProps) => {
|
||||||
const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary';
|
const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary'
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
@ -44,5 +43,5 @@ export const Button = ({
|
||||||
>
|
>
|
||||||
{label}
|
{label}
|
||||||
</button>
|
</button>
|
||||||
);
|
)
|
||||||
};
|
}
|
||||||
|
|
|
@ -1,17 +1,15 @@
|
||||||
import React from 'react';
|
import { Button } from './Button'
|
||||||
|
import './header.css'
|
||||||
import { Button } from './Button';
|
|
||||||
import './header.css';
|
|
||||||
|
|
||||||
type User = {
|
type User = {
|
||||||
name: string;
|
name: string
|
||||||
};
|
}
|
||||||
|
|
||||||
interface HeaderProps {
|
interface HeaderProps {
|
||||||
user?: User;
|
user?: User
|
||||||
onLogin: () => void;
|
onLogin: () => void
|
||||||
onLogout: () => void;
|
onLogout: () => void
|
||||||
onCreateAccount: () => void;
|
onCreateAccount: () => void
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Header = ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => (
|
export const Header = ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => (
|
||||||
|
@ -53,4 +51,4 @@ export const Header = ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
);
|
)
|
||||||
|
|
Loading…
Reference in New Issue