-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create zero state for bnr (#1179)
* feat: create zero state for bnr * fix: PR requests
- Loading branch information
Showing
8 changed files
with
151 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 99 additions & 0 deletions
99
src/components/learner-credit-management/empty-state/NoBnEBudgetActivity.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
import React from 'react'; | ||
import classNames from 'classnames'; | ||
import { | ||
Button, Card, Row, Col, | ||
} from '@edx/paragon'; | ||
import { Link } from 'react-router-dom'; | ||
|
||
import { useIsLargeOrGreater } from '../data'; | ||
import nameYourMembers from '../assets/reading.svg'; | ||
import memberBrowse from '../assets/phoneScroll.svg'; | ||
import enrollAndSpend from '../assets/wallet.svg'; | ||
|
||
const NameYourMembersIllustration = (props) => ( | ||
<img data-testid="name-your-members-illustration" src={nameYourMembers} alt="" {...props} /> | ||
); | ||
|
||
const MemberBrowseIllustration = (props) => ( | ||
<img data-testid="members-browse-illustration" src={memberBrowse} alt="" {...props} /> | ||
); | ||
|
||
const EnrollAndSpendIllustration = (props) => ( | ||
<img data-testid="enroll-and-spend-illustration" src={enrollAndSpend} alt="" {...props} /> | ||
); | ||
|
||
const NoBnEBudgetActivity = () => { | ||
const isLargeOrGreater = useIsLargeOrGreater(); | ||
|
||
return ( | ||
<Card className="mb-4"> | ||
<Card.Section className={classNames('text-center', { 'bg-light-300': isLargeOrGreater })}> | ||
<h3 className={classNames({ 'mb-4.5': isLargeOrGreater })}> | ||
No budget activity yet? Invite members to browse the catalog and enroll! | ||
</h3> | ||
{isLargeOrGreater && ( | ||
<Row> | ||
<Col> | ||
<NameYourMembersIllustration /> | ||
</Col> | ||
<Col> | ||
<MemberBrowseIllustration /> | ||
</Col> | ||
<Col> | ||
<EnrollAndSpendIllustration /> | ||
</Col> | ||
</Row> | ||
)} | ||
</Card.Section> | ||
<Card.Section className="text-center"> | ||
<Row className={classNames({ 'mb-5': isLargeOrGreater })}> | ||
<Col className="mb-5 mb-lg-0"> | ||
{!isLargeOrGreater && <NameYourMembersIllustration className="mb-5" />} | ||
<h4> | ||
<span className="d-block text-brand mb-2">01</span> | ||
Name your members | ||
</h4> | ||
<span> | ||
Upload or enter email addresses to invite people to browse and enroll | ||
using this budget. | ||
</span> | ||
</Col> | ||
<Col className="mb-5 mb-lg-0"> | ||
{!isLargeOrGreater && <MemberBrowseIllustration className="mb-5" />} | ||
<h4> | ||
<span className="d-block text-brand mb-2">02</span> | ||
Members find the right course | ||
</h4> | ||
<span> | ||
Members can then browse the catalog associated with this budget and | ||
find a course that aligns with their interests. | ||
</span> | ||
</Col> | ||
<Col className="mb-5 mb-lg-0"> | ||
{!isLargeOrGreater && <EnrollAndSpendIllustration className="mb-5" />} | ||
<h4> | ||
<span className="d-block text-brand mb-2">03</span> | ||
Members can enroll and spend | ||
</h4> | ||
<span> | ||
Members can enroll in courses, subject to any limits in this budget's | ||
settings. The deducted costs from this budget will be visible right here | ||
in your budget activity! | ||
</span> | ||
</Col> | ||
</Row> | ||
<Row> | ||
<Col> | ||
<Button | ||
as={Link} | ||
> | ||
Get started | ||
</Button> | ||
</Col> | ||
</Row> | ||
</Card.Section> | ||
</Card> | ||
); | ||
}; | ||
|
||
export default NoBnEBudgetActivity; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters