File tree Expand file tree Collapse file tree 3 files changed +12
-20
lines changed
Expand file tree Collapse file tree 3 files changed +12
-20
lines changed Original file line number Diff line number Diff line change 11import React from "react"
2- import { Typography , styled } from "ol-components"
3- import { ButtonLink } from "@mitodl/smoot-design"
2+ import { Typography , styled , LinkAdapter } from "ol-components"
43import { RiSparkling2Line } from "@remixicon/react"
54import AiRecommendationBotDrawer from "./AiRecommendationBotDrawer"
65import { RECOMMENDER_QUERY_PARAM } from "@/common/urls"
76
8- const StyledButton = styled ( ButtonLink ) ( ( { theme } ) => ( {
7+ const StyledButton = styled ( LinkAdapter ) ( ( { theme } ) => ( {
98 display : "flex" ,
109 flexDirection : "row" ,
1110 gap : "8px" ,
12- minWidth : "auto" ,
1311 padding : "4px 0" ,
1412 color : theme . custom . colors . darkGray2 ,
15- border : "none" ,
16- background : "none" ,
1713 svg : {
1814 fill : theme . custom . colors . lightRed ,
1915 width : "20px" ,
2016 height : "20px" ,
2117 } ,
22- "&&" : {
23- ":hover" : {
24- background : "none" ,
25- color : theme . custom . colors . red ,
26- p : {
27- color : theme . custom . colors . red ,
28- } ,
29- } ,
18+ "&:hover" : {
19+ color : theme . custom . colors . red ,
3020 } ,
3121} ) )
3222
3323const AskTIMButton = ( ) => {
3424 return (
3525 < >
36- < StyledButton
37- shallow
38- variant = "bordered"
39- edge = "rounded"
40- href = { `?${ RECOMMENDER_QUERY_PARAM } ` }
41- >
26+ < StyledButton shallow href = { `?${ RECOMMENDER_QUERY_PARAM } ` } >
4227 < RiSparkling2Line />
4328 < Typography variant = "body1" >
4429 Ask< strong > TIM</ strong >
Original file line number Diff line number Diff line change @@ -142,6 +142,10 @@ const ActionStrip = styled.div(({ theme }) => ({
142142 gap : "24px" ,
143143 marginTop : "16px" ,
144144 marginBottom : "24px" ,
145+ /**
146+ * minHeight 28px avoids layout shift as feature flag for AskTim button loads.
147+ */
148+ minHeight : "28px" ,
145149 [ theme . breakpoints . down ( "sm" ) ] : {
146150 marginTop : "0" ,
147151 } ,
Original file line number Diff line number Diff line change @@ -149,6 +149,9 @@ export type {
149149 SelectFieldProps ,
150150} from "./components/SelectField/SelectField"
151151
152+ export { LinkAdapter } from "./components/LinkAdapter/LinkAdapter"
153+ export type { LinkAdapterProps } from "./components/LinkAdapter/LinkAdapter"
154+
152155export { Link , linkStyles } from "./components/Link/Link"
153156export type { LinkProps } from "./components/Link/Link"
154157
You can’t perform that action at this time.
0 commit comments