[monorepo][lg] - start of monorepo

This commit is contained in:
Luccas Mateus de Medeiros Gomes
2023-04-10 22:22:34 -03:00
parent a48b394115
commit fda6c4b827
300 changed files with 47972 additions and 130858 deletions

View File

@@ -1,15 +0,0 @@
type LinkProps = {
url: string;
format: any;
};
const CustomLink: React.FC<LinkProps> = ({ url, format }: LinkProps) => (
<a
href={url}
className="bg-white hover:bg-gray-200 border text-black font-semibold py-2 px-4 rounded"
>
{format}
</a>
);
export default CustomLink;

View File

@@ -1,17 +0,0 @@
const ErrorMessage: React.FC<{ message: any }> = ({ message }) => {
return (
<aside>
{message}
<style jsx>{`
aside {
padding: 1.5em;
font-size: 14px;
color: white;
background-color: red;
}
`}</style>
</aside>
);
};
export default ErrorMessage;

View File

@@ -1,53 +0,0 @@
interface TableProps {
columns: Array<any>;
data: Array<any>;
className?: string;
}
const Table: React.FC<TableProps> = ({ columns, data, className }) => {
return (
<div className="-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div className="py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8">
<div className="shadow overflow-hidden border-b border-gray-200 sm:rounded-lg">
<table
className={`min-w-full divide-y divide-gray-200 ${className}`}
>
<thead className="bg-gray-50">
<tr>
{columns.map(({ key, name }) => (
<th
key={key}
scope="col"
className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
>
{name}
</th>
))}
</tr>
</thead>
<tbody className="bg-white divide-y divide-gray-200">
{data.map((item) => (
<tr key={item.id}>
{columns.map(({ key, render }) => (
<td
key={key}
className="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"
>
{(render &&
typeof render === 'function' &&
render(item)) ||
item[key] ||
''}
</td>
))}
</tr>
))}
</tbody>
</table>
</div>
</div>
</div>
);
};
export default Table;

View File

@@ -1,5 +0,0 @@
import Table from './Table';
import ErrorMessage from './Error';
import CustomLink from './CustomLink';
export { Table, ErrorMessage, CustomLink };