import styled, { css } from "styled-components"; import { TYPOGRAPHY, COMMON, FLEXBOX, } from "@sproutsocial/seeds-react-system-props"; import { focusRing, disabled } from "@sproutsocial/seeds-react-mixins"; import Text from "@sproutsocial/seeds-react-text"; import type { TypeLinkProps } from "./LinkTypes"; const Container = styled(Text)` border: 0; font-family: ${(props) => props.theme.fontFamily}; text-decoration: ${(props) => (props.underline ? "underline" : "none")}; appearance: none; cursor: pointer; ${(props) => props.disabled && css` opacity: 0.4; cursor: not-allowed; `} font-weight: ${(props) => props.theme.fontWeights.semibold}; color: ${(props) => props.theme.colors.link.base}; &:hover { color: ${(props) => props.theme.colors.link.hover}; text-decoration: underline; } &:active { color: ${(props) => props.theme.colors.link.hover}; } &:focus { ${focusRing} } &:focus:active { box-shadow: none; } ${(props) => !props.href && css` background: none; `} ${(props) => props.disabled && disabled} ${COMMON} ${TYPOGRAPHY} ${FLEXBOX} `; export default Container;