diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/Button.tsx | 10 | ||||
-rw-r--r-- | src/components/Header.tsx | 2 | ||||
-rw-r--r-- | src/components/ListTable.tsx | 2 | ||||
-rw-r--r-- | src/index.tsx | 10 |
4 files changed, 14 insertions, 10 deletions
diff --git a/src/components/Button.tsx b/src/components/Button.tsx index 55ceda6..5fd69b2 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -7,14 +7,16 @@ interface Props { const styles = { - contained: "bg-black text-white", - outlined: "border-2 border-black" + contained: 'bg-black text-white', + outlined: 'border-2 border-black', }; const Button: React.FC<Props> = ({ children, variant = 'contained' }) => { - return ( - <button className={`p-4 m-3 font-bold tracking-wide hover:underline focus:outline-none ${styles[variant]}`}> + <button + type="button" + className={`p-4 m-3 font-bold tracking-wide hover:underline focus:outline-none ${styles[variant]}`} + > {children} </button> ); diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 75d96a9..bc77bf8 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -8,7 +8,7 @@ interface Props { }[]; } -const Header: React.FC<Props> = ({ children, navigation }) => { +const Header: React.FC<Props> = ({ navigation }) => { return ( <header className="bg-black text-white flex"> {navigation.map(({ name, route }) => ( diff --git a/src/components/ListTable.tsx b/src/components/ListTable.tsx index 5d899e0..9faa0ad 100644 --- a/src/components/ListTable.tsx +++ b/src/components/ListTable.tsx @@ -12,7 +12,7 @@ interface Props { } -const ListTable: React.FC<Props> = ({ children, items, fields, handleRowClick = () => {} }) => { +const ListTable: React.FC<Props> = ({ items, fields, handleRowClick = () => {} }) => { return ( <table className="m-2 table-auto w-full"> <thead> diff --git a/src/index.tsx b/src/index.tsx index 169da4c..0b6f723 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -4,15 +4,17 @@ import 'tailwindcss/tailwind.css'; import { BrowserRouter as Router, Switch, - Route + Route, } from 'react-router-dom'; import Header from './components/Header'; import Home from './containers/Home'; import Products from './containers/Products'; const navigation = [ - { name: 'Главная', route: '/'}, - { name: 'Товары', route: '/products'} + { name: 'Главная', route: '/' }, + { name: 'Товары', route: '/products' }, + { name: 'Контрагенты', route: '/contractors' }, + { name: 'Накладные', route: '/waybills' }, ]; const App: React.FC = () => ( @@ -29,5 +31,5 @@ ReactDOM.render( <React.StrictMode> <App /> </React.StrictMode>, - document.getElementById('root') + document.getElementById('root'), ); |