-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
14 changed files
with
180 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import './styles.css'; | ||
|
||
import { PropsWithChildren } from 'react'; | ||
|
||
export const MdTable = (props: PropsWithChildren<unknown>): JSX.Element => { | ||
const { children } = props; | ||
|
||
return ( | ||
<div className="table-container"> | ||
<table className="table-container__table">{children}</table> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import './styles.css'; | ||
|
||
import { PropsWithChildren } from 'react'; | ||
|
||
export const MdTableBody = (props: PropsWithChildren<unknown>): JSX.Element => { | ||
const { children } = props; | ||
|
||
return <tbody className="align-baseline">{children}</tbody>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import './styles.css'; | ||
|
||
import { PropsWithChildren } from 'react'; | ||
|
||
export const MdTableCell = (props: PropsWithChildren<unknown>): JSX.Element => { | ||
const { children } = props; | ||
|
||
return <td>{children}</td>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import './styles.css'; | ||
|
||
import { PropsWithChildren } from 'react'; | ||
|
||
export const MdTableHead = (props: PropsWithChildren<unknown>): JSX.Element => { | ||
const { children } = props; | ||
|
||
return <thead>{children}</thead>; | ||
}; |
11 changes: 11 additions & 0 deletions
11
src/components/shared/Table/MarkdownTable/MdTableHeader.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import './styles.css'; | ||
|
||
import { PropsWithChildren } from 'react'; | ||
|
||
export const MdTableHeader = ( | ||
props: PropsWithChildren<unknown> | ||
): JSX.Element => { | ||
const { children } = props; | ||
|
||
return <th className="table-container__header">{children}</th>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import './styles.css'; | ||
|
||
import { PropsWithChildren } from 'react'; | ||
|
||
export const MdTableRow = (props: PropsWithChildren<unknown>): JSX.Element => { | ||
const { children } = props; | ||
|
||
return <tr>{children}</tr>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export * from './MdTable'; | ||
export * from './MdTableBody'; | ||
export * from './MdTableCell'; | ||
export * from './MdTableHead'; | ||
export * from './MdTableHeader'; | ||
export * from './MdTableRow'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
.table-container__table thead { | ||
@apply table-header-group; | ||
} | ||
|
||
.table-container { | ||
@apply w-full; | ||
@apply mx-auto mt-0 mb-10; | ||
@apply max-h-[31.25rem]; | ||
@apply overflow-auto; | ||
} | ||
|
||
.table-container__table { | ||
@apply w-auto; | ||
@apply border-collapse; | ||
} | ||
|
||
.table-container__header { | ||
@apply sticky; | ||
@apply top-0; | ||
@apply z-10; | ||
} | ||
|
||
.table-container__table tr { | ||
@apply even:bg-[#27272b] odd:bg-[#303036]; | ||
} | ||
|
||
.table-container__table thead tr { | ||
@apply bg-claret; | ||
@apply text-[#D0CEC8]; | ||
@apply drop-shadow-lg; | ||
} | ||
|
||
.table-container__table thead tr th { | ||
@apply bg-claret; | ||
@apply text-[#D0CEC8]; | ||
} | ||
|
||
.table-container__table th { | ||
@apply p-3; | ||
@apply text-left; | ||
} | ||
|
||
.table-container__table td { | ||
@apply p-3; | ||
@apply text-left; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 9 additions & 9 deletions
18
src/components/shared/Table/styles.css → ...s/shared/Table/ResponsiveTable/styles.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './ResponsiveTable/ResponsiveTable'; | ||
export * from './MarkdownTable'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
| obj | value | something | | ||
| ---------- | ----- | ------------------------------------------------------------------- | | ||
| foo | 200 | ahjFDHSAJKÖGLSHNBGFJKLÖHSDG KLJÖSDHNJGKLSDHGKLSJGH FNLKÖSGFHSDLÖKG | | ||
| bar | 500 | KJKLASFDJKLASDFASDFDFJAKSLDFJSLKDGFSDJGLKSDGFSGDKLJM | | ||
| Woap Woap | 600 | SÖL:FGKÖLAÄGJR$EQJOKIRHGBTJKMQWRMTG WER- QWKJRQEHRJIUHQWRKL;M ASVF; | | ||
| Youp | 7000 | LTREWKOLPÄEQRG | | ||
| Schnabelös | 30 | ÖLKLQWÖERB FSADEKJRGKLR AEEJQWHJQWTH | |