Skip to content

Commit

Permalink
Add number of components available
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Samec committed Dec 16, 2024
1 parent 2be1aed commit f198a12
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ const useStyles = makeStyles({
secondLevel: { 'margin-left': '30px' },
thirdLevel: { 'margin-left': '60px' },
forthLevel: { 'margin-left': '90px' },
foundMessage: { 'margin-bottom': '10px' },
heading: { margin: '30px 0 10px 0' },
root: {
// Stack the label above the field with a gap
Expand Down Expand Up @@ -339,6 +338,7 @@ export const Selector = () => {
React.useEffect(() => {
setFilteredComponentsDefinitions(componentsDefinitions.current);
}, [setFilteredComponentsDefinitions]);

const onFilterChange = (event, data) => {
setFilteredComponentsDefinitions(
componentsDefinitions.current.filter(definition => {
Expand All @@ -357,6 +357,7 @@ export const Selector = () => {
<Input onChange={onFilterChange} />
</Field>
<h2>Choose Component</h2>
<Text role="status">{filteredComponentsDefinitions.length} components available.</Text>
<Accordion multiple>
{categorizedComponents.map(category => (
<AccordionItem key={category.id} value={category.id}>
Expand Down

0 comments on commit f198a12

Please sign in to comment.