diff --git a/packages/orbit-components/src/TileGroup/index.tsx b/packages/orbit-components/src/TileGroup/index.tsx index fa18e601b2..dde103bfca 100644 --- a/packages/orbit-components/src/TileGroup/index.tsx +++ b/packages/orbit-components/src/TileGroup/index.tsx @@ -1,57 +1,25 @@ "use client"; import * as React from "react"; -import styled, { css } from "styled-components"; +import cx from "clsx"; -import defaultTheme from "../defaultTheme"; -import { StyledSlide } from "../utils/Slide"; import type { Props } from "./types"; -const StyledTileGroup = styled.div` - ${({ theme }) => css` - width: 100%; - padding: 0; - margin: 0; - box-shadow: ${theme.orbit.boxShadowAction}; - border-radius: ${theme.orbit.borderRadiusNormal}; - ${StyledSlide} { - background: ${theme.orbit.paletteWhite}; - } - .orbit-tile-wrapper { - border-radius: 0; - :first-child { - border-top-left-radius: ${theme.orbit.borderRadiusNormal}; - border-top-right-radius: ${theme.orbit.borderRadiusNormal}; - } - :last-child { - border-bottom-left-radius: ${theme.orbit.borderRadiusNormal}; - border-bottom-right-radius: ${theme.orbit.borderRadiusNormal}; - } - :not(:last-child) { - border-bottom: 1px solid ${theme.orbit.paletteCloudNormal}; - } - box-shadow: none; - transition: background ${theme.orbit.durationFast} ease-in-out, - box-shadow ${theme.orbit.durationFast} ease-in-out, - border-color ${theme.orbit.durationFast} ease-in-out; - :hover, - :focus { - background: ${theme.orbit.paletteCloudNormal}; - } - } - `} -`; - -StyledTileGroup.defaultProps = { - theme: defaultTheme, -}; - const TileGroup = ({ children, dataTest, id, as }: Props) => { + const Component = (as ?? "div") as React.ElementType; + return ( - // @ts-expect-error FIXME: ts-migrate - + {children} - + ); }; diff --git a/packages/orbit-components/src/utils/Slide/index.tsx b/packages/orbit-components/src/utils/Slide/index.tsx index 8831a6a7a4..577b850df5 100644 --- a/packages/orbit-components/src/utils/Slide/index.tsx +++ b/packages/orbit-components/src/utils/Slide/index.tsx @@ -147,6 +147,7 @@ class Slide extends React.Component { const { transitionFinished, maxHeight, visible } = this.state; return (