diff --git a/platform/ui/index.js b/platform/ui/index.js index 606d4ae26..407ac00f2 100644 --- a/platform/ui/index.js +++ b/platform/ui/index.js @@ -4,6 +4,7 @@ export { Icon, IconButton, Svg, + Input, ThemeWrapper, Typography, } from './src/components'; diff --git a/platform/ui/src/components/Button/Button.jsx b/platform/ui/src/components/Button/Button.jsx index 4544d8f80..293a19ed8 100644 --- a/platform/ui/src/components/Button/Button.jsx +++ b/platform/ui/src/components/Button/Button.jsx @@ -61,7 +61,7 @@ const variantClasses = { }; const sizeClasses = { - small: 'py-2 px-2 text-base', + small: 'py-2 px-2 text-sm', medium: 'py-2 px-2 text-lg', large: 'py-2 px-6 text-xl', }; @@ -97,12 +97,13 @@ const Button = ({ return ( + + +
+ {isFiltering() && ( + + )} + + {numOfStudies > 100 ? '>100' : numOfStudies} + + + Studies + +
+ +
+ {filtersMeta.map(({ name, displayName, inputType, isSortable }) => { + return ( + 0 + } + isBeingSorted={sortBy === name} + sortDirection={sortDirection} + onLabelClick={() => handleFilterLabelClick(name)} + inputType={inputType} + > + handleFilterValueChange(event, name)} + /> + + ); + })} + +
+ + + ); +}; + +StudyListFilter.propTypes = { + filtersMeta: PropTypes.arrayOf({ + name: PropTypes.string, + dsplayName: PropTypes.string, + inputType: PropTypes.oneOf(['text', 'select', 'date-range', 'none']), + isSortable: PropTypes.bool, + }), + filtersValues: PropTypes.object, + numOfStudies: PropTypes.number, }; export default StudyListFilter;