Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Table): migrate TableFooter to Tailwind
- Loading branch information
Showing
1 changed file
with
2 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,11 @@ | ||
"use client"; | ||
|
||
import * as React from "react"; | ||
import styled from "styled-components"; | ||
|
||
import type * as Common from "../../common/types"; | ||
import defaultTheme from "../../defaultTheme"; | ||
|
||
export const StyledTableFooter = styled(({ children, className, dataTest }) => ( | ||
<tfoot className={className} data-test={dataTest}> | ||
const TableFooter = ({ children, dataTest }: React.PropsWithChildren<Common.Globals>) => ( | ||
<tfoot className="bg-cloud-normal w-full whitespace-nowrap font-bold" data-test={dataTest}> | ||
{children} | ||
</tfoot> | ||
))` | ||
width: 100%; | ||
white-space: nowrap; | ||
background: ${({ theme }) => theme.orbit.paletteCloudNormal}; | ||
font-weight: bold; | ||
`; | ||
|
||
StyledTableFooter.defaultProps = { | ||
theme: defaultTheme, | ||
}; | ||
|
||
const TableFooter: React.FC<React.PropsWithChildren<Common.Globals>> = ({ children, dataTest }) => ( | ||
<StyledTableFooter dataTest={dataTest}>{children}</StyledTableFooter> | ||
); | ||
|
||
export default TableFooter; |