-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b00d654
commit 18191a7
Showing
8 changed files
with
314 additions
and
33 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 |
---|---|---|
@@ -1,5 +1,14 @@ | ||
import React from 'react'; | ||
|
||
export function Caption(props: React.PropsWithChildren) { | ||
return <caption>{props.children}</caption>; | ||
type CaptionProps = { | ||
children: React.ReactNode; | ||
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'; | ||
}; | ||
|
||
export function Caption({ children, size = 'lg' }: CaptionProps) { | ||
return ( | ||
<caption className={`gi-text-left gi-mb-4 gi-font-bold gi-text-${size}`}> | ||
{children} | ||
</caption> | ||
); | ||
} |
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 |
---|---|---|
@@ -1,5 +1,16 @@ | ||
import React from 'react'; | ||
import { cn } from '../cn.js'; | ||
|
||
export function TableData(props: React.PropsWithChildren) { | ||
return <td>{props.children}</td>; | ||
interface TableDataProps extends React.PropsWithChildren { | ||
className?: string; | ||
colSpan?: number; | ||
} | ||
|
||
export function TableData({ children, className, colSpan }: TableDataProps) { | ||
const baseClasses = 'gi-table-td'; | ||
return ( | ||
<td className={cn(baseClasses, className)} colSpan={colSpan}> | ||
{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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import React from 'react'; | ||
|
||
export function TableHeader(props: React.PropsWithChildren) { | ||
return <th>{props.children}</th>; | ||
return <th className="gi-table-th">{props.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 |
---|---|---|
@@ -1,5 +1,9 @@ | ||
import React from 'react'; | ||
|
||
export function TableRow(props: React.PropsWithChildren) { | ||
return <tr>{props.children}</tr>; | ||
interface TableRowProps extends React.PropsWithChildren { | ||
className?: string; | ||
} | ||
|
||
export function TableRow({ children, className }: TableRowProps) { | ||
return <tr className={className}>{children}</tr>; | ||
} |
Oops, something went wrong.