diff --git a/packages/orbit-components/src/Tile/components/TileContent/index.tsx b/packages/orbit-components/src/Tile/components/TileContent/index.tsx index 0a1adebb75..631f528fcb 100644 --- a/packages/orbit-components/src/Tile/components/TileContent/index.tsx +++ b/packages/orbit-components/src/Tile/components/TileContent/index.tsx @@ -1,8 +1,5 @@ import * as React from "react"; -import styled, { css } from "styled-components"; - -import mq from "../../../utils/mediaQuery"; -import defaultTheme from "../../../defaultTheme"; +import cx from "clsx"; interface Props { noPadding: boolean; @@ -11,70 +8,21 @@ interface Props { useMargins?: boolean; } -const getPadding = ({ - noPadding, - useMargins, - theme, -}: { - noPadding?: Props["noPadding"]; - useMargins?: Props["useMargins"]; - theme: typeof defaultTheme; -}) => { - if (noPadding) return null; - - if (!useMargins) { - return css` - padding: ${theme.orbit.spaceMedium}; - - ${mq.largeMobile(css` - padding: ${theme.orbit.spaceLarge}; - `)} - `; - } - - return css` - padding: ${theme.orbit.spaceMedium} 0; - margin: 0 ${theme.orbit.spaceMedium}; - - ${mq.largeMobile(css` - padding: ${theme.orbit.spaceLarge} 0; - margin: 0 ${theme.orbit.spaceLarge}; - `)} - `; -}; - -const StyledTileContent = styled.div` - ${({ theme, withBorder, withPointer }) => css` - font-size: ${theme.orbit.fontSizeTextNormal}; - line-height: ${theme.orbit.lineHeightTextNormal}; - ${withPointer && - css` - cursor: pointer; - `}; - ${withBorder && - css` - border-top: 1px solid ${theme.orbit.paletteCloudNormal}; - `}; - ${getPadding}; - `} -`; - -StyledTileContent.defaultProps = { - theme: defaultTheme, -}; - const TileContent = React.forwardRef>( ({ children, noPadding, withPointer, withBorder, useMargins = true }, ref) => { return ( - {children} - + ); }, );