Skip to content

Commit 56ad352

Browse files
fix(PDYE-1281): se agrega target a boton link (#721)
Co-authored-by: Javiera Munita <javiera.munita@eclass.cl>
1 parent cca79ab commit 56ad352

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/molecules/Buttons/BtnLink.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export interface props {
1212
onClick?: (e: React.MouseEvent<HTMLElement>) => void
1313
role?: 'button' | 'link'
1414
tabIndex?: number
15+
target?: '_blank' | '_self'
1516
textDecorationLine?: boolean
1617
}
1718

@@ -26,15 +27,17 @@ export function BtnLink({
2627
onClick,
2728
role = 'link',
2829
tabIndex,
30+
target = '_blank',
2931
textDecorationLine = true,
3032
}: props): JSX.Element {
3133
const typeButton = {
3234
button: {
3335
onClick,
36+
target: target,
3437
},
3538
a: {
3639
href,
37-
target: '_blank',
40+
target: target,
3841
},
3942
}
4043

src/organisms/Calendar/Dropdown/CalendarDropdown/Components/EventsGroup.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ export const EventsGroup = ({
8888
<Box as="span" fontSize="14px">
8989
{textSeeMore}
9090
</Box>{' '}
91-
<BtnLink onClick={redirect}>{textLinkMore}</BtnLink>
91+
<BtnLink onClick={redirect} target="_self">
92+
{textLinkMore}
93+
</BtnLink>
9294
</Box>
9395
)}
9496
</>

0 commit comments

Comments
 (0)