UNPKG

@chayns-components/core

Version:

A set of beautiful React components for developing your own applications with chayns.

46 lines (44 loc) 1.11 kB
import { motion } from 'motion/react'; import styled, { css } from 'styled-components'; import { ClampPosition } from '../../types/truncation'; export const StyledTruncation = styled.div` position: relative; overflow: hidden; `; // Fix framer-motion bug export const StyledMotionTruncationContent = styled(motion.div)` overflow: hidden; position: relative; `; export const StyledTruncationPseudoContent = styled.div` visibility: hidden; position: absolute; width: 100%; `; export const StyledTruncationClampWrapper = styled.div` display: flex; ${_ref => { let { $position } = _ref; switch ($position) { case ClampPosition.Left: return css` justify-content: left; `; case ClampPosition.Middle: return css` justify-content: center; `; default: return css` justify-content: right; `; } }} `; export const StyledTruncationClamp = styled.a` cursor: pointer; z-index: 2; `; //# sourceMappingURL=Truncation.styles.js.map