From 02dede4a8190551d37b2a99eb1445e666d91a757 Mon Sep 17 00:00:00 2001 From: Javiera Munita Date: Wed, 21 Oct 2026 12:56:43 -0300 Subject: [PATCH 1/2] fix(PDYE-2282): reemplazo link por btn link en caja curso tradicional y prop de target --- src/molecules/Buttons/BtnLink.tsx | 4 +++- .../CourseList/components/Section.tsx | 18 ++++++------------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/molecules/Buttons/BtnLink.tsx b/src/molecules/Buttons/BtnLink.tsx index 7a53ac72f..c3901c6a6 100644 --- a/src/molecules/Buttons/BtnLink.tsx +++ b/src/molecules/Buttons/BtnLink.tsx @@ -11,6 +11,7 @@ export interface props { isDisable?: boolean m?: string onClick?: (e: React.MouseEvent) => void + p?: string role?: 'button' | 'link' tabIndex?: number target?: '_blank' | '_self' @@ -28,6 +29,7 @@ export function BtnLink({ isDisable = false, m = '0', onClick, + p, role = 'link', tabIndex, target = '_blank', @@ -57,6 +59,7 @@ export function BtnLink({ id={id} onClick={isDisable ? undefined : onClick} opacity={isDisable ? 0.5 : 1} + padding={p ? p : '.25em'} role={role} tabIndex={tabIndex} textDecorationLine={textDecorationLine ? 'underline' : 'none'} @@ -79,7 +82,6 @@ export const stylesBtnLink = { fontStyle: 'normal', fontWeight: '500', lineHeight: '1rem', - padding: '.25em', textDecorationLine: 'underline', width: 'fit-content', _hover: { diff --git a/src/organisms/CourseList/components/Section.tsx b/src/organisms/CourseList/components/Section.tsx index de6a9b691..64812c2ed 100644 --- a/src/organisms/CourseList/components/Section.tsx +++ b/src/organisms/CourseList/components/Section.tsx @@ -1,11 +1,12 @@ import * as React from 'react' -import { Box, Heading, Link, List, HStack, Text, ListItem, Flex } from '@chakra-ui/react' +import { Box, Heading, List, HStack, Text, ListItem, Flex } from '@chakra-ui/react' +import { vars } from '@theme' +import { BtnLink } from '@/molecules' import { CourseBoxContext } from '../Boxes/BoxTraditional' +import { CourseStatus } from './CourseStatus' import { DateStatus } from './DateStatus' import { IconSelection } from './IconSelection' -import { vars } from '@theme' -import { CourseStatus } from './CourseStatus' export function Section(): JSX.Element | null { const { name, dateStatus, information, progress, status } = React.useContext(CourseBoxContext) @@ -64,16 +65,9 @@ export function Section(): JSX.Element | null { {item.href !== undefined && item.href?.length > 0 ? ( - + {item.text} - + ) : ( {item.text} From 74ad492ccffdefba903dbca244e5a6c1a340cd1e Mon Sep 17 00:00:00 2001 From: Javiera Munita Date: Wed, 21 Oct 2026 13:10:19 -0300 Subject: [PATCH 2/2] fix(PDYE-2282): lint fix --- src/molecules/Buttons/BtnLink.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/molecules/Buttons/BtnLink.tsx b/src/molecules/Buttons/BtnLink.tsx index c3901c6a6..6bb80af57 100644 --- a/src/molecules/Buttons/BtnLink.tsx +++ b/src/molecules/Buttons/BtnLink.tsx @@ -59,7 +59,7 @@ export function BtnLink({ id={id} onClick={isDisable ? undefined : onClick} opacity={isDisable ? 0.5 : 1} - padding={p ? p : '.25em'} + padding={p ?? '.25em'} role={role} tabIndex={tabIndex} textDecorationLine={textDecorationLine ? 'underline' : 'none'}