|
1 | 1 | import { useCallback, useMemo, useState } from 'react'; |
2 | | - |
3 | 2 | import { |
4 | 3 | Alert, |
5 | | - Breadcrumb, Button, Card, Icon, Stack, |
| 4 | + Button, |
| 5 | + Card, |
| 6 | + Icon, |
| 7 | + Stack, |
6 | 8 | } from '@openedx/paragon'; |
7 | | -import { ArrowBack, Add, Delete } from '@openedx/paragon/icons'; |
| 9 | +import { |
| 10 | + Add, |
| 11 | + ArrowBack, |
| 12 | + ChevronRight, |
| 13 | + Delete, |
| 14 | +} from '@openedx/paragon/icons'; |
8 | 15 | import { FormattedMessage, useIntl } from '@edx/frontend-platform/i18n'; |
9 | 16 |
|
10 | 17 | import { ContainerType, getBlockType } from '@src/generic/key-utils'; |
@@ -148,25 +155,15 @@ const CompareContainersWidgetInner = ({ |
148 | 155 | return title; |
149 | 156 | } |
150 | 157 | return ( |
151 | | - <Breadcrumb |
152 | | - ariaLabel={intl.formatMessage(messages.breadcrumbAriaLabel)} |
153 | | - links={[ |
154 | | - { |
155 | | - // This raises failed prop-type error as label expects a string but it works without any issues |
156 | | - label: <Stack direction="horizontal" gap={1}><Icon size="xs" src={ArrowBack} />Back</Stack>, |
157 | | - onClick: onBackBtnClick, |
158 | | - variant: 'link', |
159 | | - className: 'px-0 text-gray-900', |
160 | | - }, |
161 | | - { |
162 | | - label: title, |
163 | | - variant: 'link', |
164 | | - className: 'px-0 text-gray-900', |
165 | | - disabled: true, |
166 | | - }, |
167 | | - ]} |
168 | | - linkAs={Button} |
169 | | - /> |
| 158 | + <Stack direction="horizontal" gap={1}> |
| 159 | + <Button variant="link" className="px-0 text-gray-900" onClick={onBackBtnClick}> |
| 160 | + {/* We could also use iconBefore={ArrowBack} on the <Button> above but it's a bit too big that way. */} |
| 161 | + <Icon size="xs" src={ArrowBack} className="mr-1" /> |
| 162 | + {intl.formatMessage(messages.breadcrumbBackLabel)} |
| 163 | + </Button> |
| 164 | + <Icon size="md" src={ChevronRight} /> |
| 165 | + <span role="heading" aria-level={3}>{title}</span> |
| 166 | + </Stack> |
170 | 167 | ); |
171 | 168 | }, [parent]); |
172 | 169 |
|
|
0 commit comments