File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ // This file is part of React-Invenio-Forms
2
+ // Copyright (C) 2024 CERN.
3
+ //
4
+ // React-Invenio-Forms is free software; you can redistribute it and/or modify it
5
+ // under the terms of the MIT License; see LICENSE file for more details.
6
+
7
+ import React from "react" ;
8
+
9
+ export function dropdownOptionsGenerator ( dropdownOptions ) {
10
+ return dropdownOptions . map ( ( options ) => {
11
+ return {
12
+ key : options . key ,
13
+ text : options . text ,
14
+ value : options . key ,
15
+ content : (
16
+ < >
17
+ < div > { options . text } </ div >
18
+ < div >
19
+ < small className = "text-muted" > { options . description } </ small >
20
+ </ div >
21
+ </ >
22
+ ) ,
23
+ } ;
24
+ } ) ;
25
+ }
Original file line number Diff line number Diff line change 1
1
export { humanReadableBytes } from "./humanReadableBytes" ;
2
+ export { dropdownOptionsGenerator } from "./dropdownOptionsGenerator" ;
You can’t perform that action at this time.
0 commit comments