Skip to content

Commit 521edfe

Browse files
committed
feat: Add tooltip to sync button & Add disable style to edit button
1 parent ffcd0c3 commit 521edfe

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/course-outline/card-header/CardHeader.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
Hyperlink,
1111
Icon,
1212
IconButton,
13+
IconButtonWithTooltip,
1314
useToggle,
1415
} from '@openedx/paragon';
1516
import {
@@ -175,10 +176,12 @@ const CardHeader = ({
175176
) : (
176177
<>
177178
{titleComponent}
178-
<IconButton
179+
<IconButtonWithTooltip
179180
className="item-card-button-icon"
181+
variant={isDisabledEditField ? 'light' : 'primary'}
180182
data-testid={`${namePrefix}-edit-button`}
181183
alt={intl.formatMessage(messages.altButtonEdit)}
184+
tooltipContent={<div>{intl.formatMessage(messages.altButtonEdit)}</div>}
182185
iconAs={EditIcon}
183186
onClick={onClickEdit}
184187
// @ts-ignore
@@ -195,10 +198,11 @@ const CardHeader = ({
195198
)}
196199
{extraActionsComponent}
197200
{readyToSync && (
198-
<IconButton
201+
<IconButtonWithTooltip
199202
data-testid={`${namePrefix}-sync-button`}
200203
alt={intl.formatMessage(messages.readyToSyncButtonAlt)}
201204
iconAs={SyncIcon}
205+
tooltipContent={<div>{intl.formatMessage(messages.readyToSyncButtonAlt)}</div>}
202206
onClick={onClickSync}
203207
/>
204208
)}

0 commit comments

Comments
 (0)