@@ -18,7 +18,6 @@ function BibleBookList({
1818 BibleBookListClasses,
1919 bookClasses,
2020 testaments,
21- showTitle,
2221 sortFirstNT,
2322} ) {
2423 const [ checkState , setCheckState ] = useState ( ! showInactive ) ;
@@ -99,7 +98,7 @@ function BibleBookList({
9998 { testamentList . map ( ( el , index ) => {
10099 return (
101100 < BookList
102- title = { showTitle ? el . title : '' }
101+ title = { el . title }
103102 bookList = { el . bookList }
104103 showInactive = { ! checkState }
105104 onClickBook = { onClickBook }
@@ -119,71 +118,52 @@ function BibleBookList({
119118}
120119
121120BibleBookList . defaultProps = {
122- showCheckbox : false ,
121+ showCheckbox : true ,
122+ sortFirstNT : false ,
123123 testaments : 'all' ,
124- titleOT : 'Old Testament ' ,
125- titleNT : 'New Testament ' ,
124+ titleOT : '' ,
125+ titleNT : '' ,
126126 showInactive : true ,
127- onClickBook : ( ) => { } ,
127+ onClickBook : ( bookId ) => { } ,
128128 labelForCheckbox : 'Show only existing books' ,
129129 titleBooks : { } ,
130- BibleBookListClasses : { } ,
131130 availableBookList : [ ] ,
132131} ;
133132
134133BibleBookList . propTypes = {
135134 testaments : PropTypes . oneOf ( [ 'all' , 'nt' , 'ot' ] ) ,
136- /**
137- * Block header of "New Testament"
138- */
135+ /** block header of "New Testament" */
139136 titleNT : PropTypes . string ,
140- /**
141- * Block header of "New Testament"
142- */
137+ /** block header of "Old Testament" */
143138 titleOT : PropTypes . string ,
144- /**
145- * Show block header
146- */
147- showTitle : PropTypes . bool ,
148- /**
149- * When true, show first New Testament, second - Old Testament
150- */
139+ /** when true, show first New Testament, second - Old Testament */
151140 sortFirstNT : PropTypes . bool ,
152- /**
153- * Array of existing bookId's
154- */
141+ /** array of existing bookId's */
155142 availableBookList : PropTypes . array ,
156- /**
157- * Array of bookId with the titles to be translated. If not set - get the default value in English
158- */
143+ /** Array of bookId with the titles to be translated. If not set - get the default value in English */
159144 titleBooks : PropTypes . object ,
160- /**
161- * show or hide checkbox that show only existing books
162- */
145+ /** show or hide checkbox that show only existing books */
163146 showCheckbox : PropTypes . bool ,
164- /** Whether to display inactive books */
147+ /** whether to display inactive books */
165148 showInactive : PropTypes . bool ,
166- /**
167- * label of checkbox
168- */
149+ /** label of checkbox */
169150 labelForCheckbox : PropTypes . string ,
170-
171- BibleBookListClasses : PropTypes . objectOf (
172- PropTypes . shape ( {
173- /** title className */
174- title : PropTypes . string ,
175- /** book className */
176- book : PropTypes . string ,
177- /** bookList className */
178- bookList : PropTypes . string ,
179- /** className for label of checkbox */
180- label : PropTypes . string ,
181- } )
182- ) ,
151+ /** object of className */
152+ BibleBookListClasses : PropTypes . shape ( {
153+ /** title className */
154+ title : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . object ] ) ,
155+ /** book className */
156+ book : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . object ] ) ,
157+ /** bookList className */
158+ bookList : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . object ] ) ,
159+ /** className for label of checkbox */
160+ label : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . object ] ) ,
161+ } ) ,
162+ /** override the style of the Button mui component */
183163 bookClasses : PropTypes . object ,
184- /** An open book, a different style will be applied to it */
164+ /** an open book, a different style will be applied to it */
185165 selectedBookId : PropTypes . string ,
186- /** Event by clicking on the book. Receives a book ID at the entrance. */
166+ /** Event by clicking on the book. Receives a bookId at the entrance. */
187167 onClickBook : PropTypes . func ,
188168} ;
189169
0 commit comments