Skip to content

Commit

Permalink
feat(Table): migrate TableFooter to Tailwind
Browse files Browse the repository at this point in the history
  • Loading branch information
oreqizer committed Nov 8, 2023
1 parent e0b16cb commit f18a75c
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions packages/orbit-components/src/Table/TableFooter/index.tsx
@@ -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;

0 comments on commit f18a75c

Please sign in to comment.