diff --git a/src/elements/Button/index.tsx b/src/elements/Button/index.tsx index d7bcfc6c8..dd902942e 100644 --- a/src/elements/Button/index.tsx +++ b/src/elements/Button/index.tsx @@ -2,7 +2,7 @@ import classnames from 'classnames' import { useCallback, useMemo, type MouseEvent, type ButtonHTMLAttributes, type FunctionComponent } from 'react' import styled from 'styled-components' -import { interpolatePrimaryButtonThemedCss, interpolateSecondaryButtonThemedCss } from './utils' +import { getPrimaryButtonCss, getSecondaryButtonCss } from './utils' import { Accent, Size } from '../../constants' import { type IconProps } from '../../types/definitions' import { stopMouseEventPropagation } from '../../utils/stopMouseEventPropagation' @@ -127,9 +127,9 @@ const ButtonLabel = styled.span` white-space: nowrap; ` -const PrimaryButton = styled(BaseButton)(interpolatePrimaryButtonThemedCss) +const PrimaryButton = styled(BaseButton)(getPrimaryButtonCss) -const SecondaryButton = styled(BaseButton)(interpolateSecondaryButtonThemedCss) +const SecondaryButton = styled(BaseButton)(getSecondaryButtonCss) const TertiaryButton = styled(BaseButton)` background-color: ${p => p.theme.color.white}; diff --git a/src/elements/Button/utils.ts b/src/elements/Button/utils.ts index 7277340ac..ccdf00874 100644 --- a/src/elements/Button/utils.ts +++ b/src/elements/Button/utils.ts @@ -1,6 +1,6 @@ import { css } from 'styled-components' -export function interpolatePrimaryButtonThemedCss() { +export function getPrimaryButtonCss() { return css` background-color: ${p => p.theme.color.charcoal}; border: 1px solid ${p => p.theme.color.charcoal}; @@ -29,7 +29,7 @@ export function interpolatePrimaryButtonThemedCss() { ` } -export function interpolateSecondaryButtonThemedCss() { +export function getSecondaryButtonCss() { return css` background-color: transparent; border: 1px solid ${p => p.theme.color.charcoal}; diff --git a/src/elements/IconButton.tsx b/src/elements/IconButton.tsx index 69f4c379a..9b2a5c43b 100644 --- a/src/elements/IconButton.tsx +++ b/src/elements/IconButton.tsx @@ -2,7 +2,7 @@ import classnames from 'classnames' import { useMemo, type MouseEvent, type ButtonHTMLAttributes, type FunctionComponent, useCallback } from 'react' import styled from 'styled-components' -import { interpolatePrimaryButtonThemedCss, interpolateSecondaryButtonThemedCss } from './Button/utils' +import { getPrimaryButtonCss, getSecondaryButtonCss } from './Button/utils' import { Accent, Size } from '../constants' import { type IconProps } from '../types/definitions' import { stopMouseEventPropagation } from '../utils/stopMouseEventPropagation' @@ -183,9 +183,9 @@ const BaseButton = styled.button<{ padding: ${p => (p.$isCompact ? 0 : PADDING[p.$size])}; ` -const PrimaryButton = styled(BaseButton)(interpolatePrimaryButtonThemedCss) +const PrimaryButton = styled(BaseButton)(getPrimaryButtonCss) -const SecondaryButton = styled(BaseButton)(interpolateSecondaryButtonThemedCss) +const SecondaryButton = styled(BaseButton)(getSecondaryButtonCss) const TertiaryButton = styled.button` background-color: transparent;