@@ -2,7 +2,7 @@ import React from "react";
22import styled from "styled-components" ;
33
44import { Actor } from "../../types" ;
5- import { Text , Box , IconButton , ICON_BUTTON_VARIANTS , ActorAvatar , theme , clampLines } from "@apify/ui-library" ;
5+ import { Text , Box , ActorAvatar , theme , clampLines , Link } from "@apify/ui-library" ;
66import { PeopleIcon , CoinIcon , StarEmptyIcon , ExternalLinkIcon } from "@apify/ui-icons" ;
77import { formatNumber , formatDecimalNumber , formatPricing } from "../../utils/formatting" ;
88import { ActorStats , StructuredPricingInfo } from "../../types" ;
@@ -50,6 +50,29 @@ const BoxGroup = styled(Box)`
5050 align-items: center;
5151` ;
5252
53+ const ExternalLinkButton = styled ( Link ) `
54+ display: inline-flex;
55+ align-items: center;
56+ justify-content: center;
57+ box-sizing: border-box;
58+ width: 32px;
59+ height: 32px;
60+ border-radius: ${ theme . radius . radius6 } ;
61+ background-color: ${ theme . color . neutral . backgroundMuted } ;
62+ border: 1px solid ${ theme . color . neutral . border } ;
63+ color: ${ theme . color . neutral . text } ;
64+ flex-shrink: 0;
65+ text-decoration: none;
66+
67+ &:hover {
68+ background-color: ${ theme . color . neutral . hover } ;
69+ }
70+
71+ & > * {
72+ pointer-events: none;
73+ }
74+ ` ;
75+
5376const StyledSeparator = styled ( Box ) `
5477 border-left: 1px solid ${ theme . color . neutral . separatorSubtle } ;
5578 height: 8px;
@@ -200,8 +223,7 @@ export const ActorCard: React.FC<ActorCardProps> = ({
200223 </ ActorTitleWrapper >
201224 </ ActorHeader >
202225 { customActionButton || (
203- // @ts -expect-error IconButton doesn't recognize `to` and `hideExternalIcon` props from Button
204- < IconButton Icon = { ExternalLinkIcon } variant = { ICON_BUTTON_VARIANTS . BORDERED } to = { actor . url } hideExternalIcon className = "flexShrink0" />
226+ < ExternalLinkButton to = { actor . url } hideExternalIcon className = "flexShrink0" > < ExternalLinkIcon size = "16" /> </ ExternalLinkButton >
205227 ) }
206228 </ ActorHeaderWithActionButton >
207229 </ BoxRow >
0 commit comments