Skip to content

Commit

Permalink
fix: update UI padding (#1133)
Browse files Browse the repository at this point in the history
* fix: update UI padding

* chore: testing updates

* chore: PR feedback
  • Loading branch information
brobro10000 authored Dec 11, 2023
1 parent 5aa596c commit 6d8ca37
Show file tree
Hide file tree
Showing 2 changed files with 300 additions and 14 deletions.
17 changes: 11 additions & 6 deletions src/components/learner-credit-management/SubBudgetCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useContext } from 'react';
import { Link } from 'react-router-dom';
import PropTypes from 'prop-types';
import dayjs from 'dayjs';
import classNames from 'classnames';
import {
Card,
Button,
Expand Down Expand Up @@ -42,6 +43,7 @@ const SubBudgetCard = ({
data-testid="view-budget"
as={Link}
to={`/${enterpriseSlug}/admin/${ROUTE_NAMES.learnerCredit}/${budgetId}`}
variant={budgetLabel.status === BUDGET_STATUSES.expired ? 'outline-primary' : 'primary'}
>
View budget
</Button>
Expand All @@ -62,10 +64,13 @@ const SubBudgetCard = ({
title={<BackgroundFetchingWrapper>{budgetType}</BackgroundFetchingWrapper>}
subtitle={<BackgroundFetchingWrapper>{subtitle}</BackgroundFetchingWrapper>}
actions={
budgetLabel.status !== BUDGET_STATUSES.scheduled
? renderActions(budgetId)
: undefined
}
budgetLabel.status !== BUDGET_STATUSES.scheduled
? renderActions(budgetId)
: undefined
}
className={classNames('align-items-center', {
'mb-4.5': budgetLabel.status !== BUDGET_STATUSES.active,
})}
/>
);
};
Expand Down Expand Up @@ -106,9 +111,9 @@ const SubBudgetCard = ({
isLoading={isLoading}
>
<Card.Body>
<Stack gap={4}>
<Stack gap={4.5}>
{renderCardHeader(displayName || 'Overview', id)}
{budgetLabel.status !== BUDGET_STATUSES.scheduled && renderCardSection()}
{budgetLabel.status === BUDGET_STATUSES.active && renderCardSection()}
</Stack>
</Card.Body>
</Card>
Expand Down
Loading

0 comments on commit 6d8ca37

Please sign in to comment.