Skip to content

Commit

Permalink
Merge pull request #7186 from Automattic/add/update-design-on-navigat…
Browse files Browse the repository at this point in the history
…ion-in-quiz-template-editor

Update design of navigation area in editor for LM quiz template
  • Loading branch information
Imran92 authored Sep 29, 2023
2 parents f158260 + 7c270ba commit 7e973cb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
16 changes: 14 additions & 2 deletions assets/course-theme/blocks/quiz-blocks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ import quizActionsMeta from './quiz-actions.block.json';
import quizBackToLessonMeta from './quiz-back-to-lesson.block.json';
import quizProgressMeta from './quiz-progress.block.json';

/**
* External dependencies
*/
import classNames from 'classnames';

const meta = {
attributes: {},
icon: {
Expand Down Expand Up @@ -64,9 +69,16 @@ export default [
'Return to the lesson the quiz belongs to.',
'sensei-lms'
),
edit() {
edit: function EditQuizBackToLesson() {
const blockProps = useBlockProps( {
className: classNames(
'sensei-lms-href',
'sensei-lms-quiz-back-to-lesson'
),
} );

return (
<span className="sensei-lms-href sensei-lms-quiz-back-to-lesson">
<span { ...blockProps }>
<ChevronLeft />
{ __( 'Back to lesson', 'sensei-lms' ) }
</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "sensei-lms/quiz-back-to-lesson",
"apiVersion": 2,
"category": "theme",
"supports": {
"align": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: fixed

Fixed back to lesson block to apply block styles in quiz navigation area

0 comments on commit 7e973cb

Please sign in to comment.