Skip to content

Commit d9f793e

Browse files
committed
Fix agentConnect button
1 parent 07844e8 commit d9f793e

File tree

2 files changed

+25
-18
lines changed

2 files changed

+25
-18
lines changed

src/AgentConnectButton.tsx

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ import agentconnectBtnPrincipalSvgUrl from "./assets/agentconnect-btn-principal.
88
import agentconnectBtnPrincipalHoverSvgUrl from "./assets/agentconnect-btn-principal-hover.svg";
99
import agentconnectBtnAlternatifSvgUrl from "./assets/agentconnect-btn-alternatif.svg";
1010
import agentconnectBtnAlternatifHoverSvgUrl from "./assets/agentconnect-btn-alternatif-hover.svg";
11+
import "./assets/agentconnect.css";
1112
import { useIsDark } from "./useIsDark";
12-
import { useColors } from "./useColors";
1313
import { getAssetUrl } from "./tools/getAssetUrl";
14+
import { cx } from "./tools/cx";
1415

1516
export type AgentConnectButtonProps = {
1617
className?: string;
@@ -30,16 +31,12 @@ export const AgentConnectButton = memo(
3031
const [isMouseHover, setIsMouseHover] = useState(false);
3132

3233
const { isDark } = useIsDark();
33-
const theme = useColors();
3434

3535
return (
3636
<div className={className} style={style} ref={ref}>
3737
<a
38+
className="agentconnect-button__link"
3839
href={url}
39-
style={{
40-
"display": "block",
41-
"backgroundImage": "unset"
42-
}}
4340
onMouseEnter={() => setIsMouseHover(true)}
4441
onMouseLeave={() => setIsMouseHover(false)}
4542
>
@@ -55,18 +52,18 @@ export const AgentConnectButton = memo(
5552
)}
5653
/>
5754
</a>
58-
<a
59-
style={{
60-
"display": "inline-block",
61-
"marginTop": fr.spacing("1v"),
62-
"color": theme.decisions.text.actionHigh.blueFrance.default
63-
}}
64-
className={fr.cx("fr-text--sm")}
65-
href="https://agentconnect.gouv.fr/"
66-
target="_blank"
67-
>
68-
{t("what is AgentConnect ?")}
69-
</a>
55+
<p>
56+
<a
57+
className={cx(
58+
"agentconnect-button__hint",
59+
fr.cx("fr-text--sm", "fr-mt-1v")
60+
)}
61+
href="https://agentconnect.gouv.fr/"
62+
target="_blank"
63+
>
64+
{t("what is AgentConnect ?")}
65+
</a>
66+
</p>
7067
</div>
7168
);
7269
})

src/assets/agentconnect.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
.agentconnect-button__link {
3+
display: block;
4+
background-image: unset;
5+
--active-tint: unset;
6+
}
7+
8+
.agentconnect-button__hint {
9+
color: var(--text-action-high-blue-france);
10+
}

0 commit comments

Comments
 (0)