PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.9
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.9
4.4.9.1 4.4.9 4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 All 141 releases
learnpress / assets / src / apps / js / frontend / quiz / components / questions / buttons.js

buttons.js in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.4.9, at assets/src/apps/js/frontend/quiz/components/questions/buttons.js

46 lines 862 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { default as ButtonHint } from '../buttons/button-hint';
2 import { default as ButtonCheck } from '../buttons/button-check';
3 import { MaybeShowButton } from '../buttons';
4 import { Fragment } from '@wordpress/element';
5
6 const Buttons = function Buttons( props ) {
7 const {
8 question,
9 } = props;
10
11 const buttons = {
12 'instant-check': () => {
13 return (
14 <MaybeShowButton
15 type="check"
16 Button={ ButtonCheck }
17 question={ question }
18 />
19 );
20 },
21 hint: () => {
22 return (
23 <MaybeShowButton
24 type="hint"
25 Button={ ButtonHint }
26 question={ question }
27 />
28 );
29 },
30 };
31
32 return (
33 <>
34 { LP.config.questionFooterButtons().map( ( name ) => {
35 return (
36 <Fragment key={ `button-${ name }` }>
37 { buttons[ name ] && buttons[ name ]() }
38 </Fragment>
39 );
40 } ) }
41 </>
42 );
43 };
44
45 export default Buttons;
46