-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Skills Builder Header component, refactor to use ModalDialog
[APER-2258] This PR adds the SkillsBuilderHeader component to the profile MFE. There was also some additional refactoring work required to display the header in the modal. The FullscreenModal component is not flexible enough to allow custom header designs to be displayed (only text). We have to pivot to using the `ModalDialog` family of components instead.
- Loading branch information
1 parent
9e34fdd
commit c53c3f0
Showing
12 changed files
with
210 additions
and
29 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions
25
src/skills-builder/skills-builder-header/SkillsBuilderHeader.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,25 @@ | ||
import React from 'react'; | ||
import { useIntl } from '@edx/frontend-platform/i18n'; | ||
import edXLogo from '../images/edX-logo.svg'; | ||
import messages from './messages'; | ||
|
||
const SkillsBuilderHeader = () => { | ||
const { formatMessage } = useIntl(); | ||
|
||
return ( | ||
<div className="d-flex"> | ||
<img src={edXLogo} alt="edx-logo" className="mt-2 h-50" /> | ||
<div className="ml-5 vertical-line" /> | ||
<div className="w-100 ml-5"> | ||
<p className="h1 header-title"> | ||
{formatMessage(messages.skillsBuilderHeaderTitle)} | ||
</p> | ||
<p className="h2 text-white"> | ||
{formatMessage(messages.skillsBuilderHeaderSubheading)} | ||
</p> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default SkillsBuilderHeader; |
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,2 @@ | ||
// eslint-disable-next-line import/prefer-default-export | ||
export { default as SkillsBuilderHeader } from './SkillsBuilderHeader'; |
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,16 @@ | ||
import { defineMessages } from '@edx/frontend-platform/i18n'; | ||
|
||
const messages = defineMessages({ | ||
skillsBuilderHeaderTitle: { | ||
id: 'skills.builder.header.title', | ||
defaultMessage: 'Skills Builder', | ||
description: 'Title for the Skills Builder feature', | ||
}, | ||
skillsBuilderHeaderSubheading: { | ||
id: 'skills.builder.header.subheading', | ||
defaultMessage: 'Let edX be your guide', | ||
description: 'Subheading to the Skills Builder title in the header component', | ||
}, | ||
}); | ||
|
||
export default messages; |
8 changes: 8 additions & 0 deletions
8
src/skills-builder/skills-builder-header/skillsBuilderHeader.scss
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,8 @@ | ||
.vertical-line { | ||
border-left: 7px solid #D23228; | ||
transform: rotate(13deg); | ||
} | ||
|
||
.header-title { | ||
color: #F0CC00; | ||
} |
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
9 changes: 9 additions & 0 deletions
9
src/skills-builder/skills-builder-modal/skillsBuilderModal.scss
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,9 @@ | ||
.skills-builder-modal { | ||
.pgn__modal-close-button{ | ||
color: #ffffff !important; | ||
} | ||
|
||
.pgn__modal-hero-bg { | ||
background-color: #00262B; | ||
} | ||
} |
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