Skip to content

Commit

Permalink
feat: resturcture with settings group, created a centralized search t…
Browse files Browse the repository at this point in the history
…ree for single check (remaining heading fix)
  • Loading branch information
Arukuen committed Nov 14, 2024
1 parent 70783ca commit c0848cf
Show file tree
Hide file tree
Showing 3 changed files with 688 additions and 530 deletions.
5 changes: 2 additions & 3 deletions src/components/admin-base-setting/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ let i = 1

const AdminBaseSetting = props => {
const [ uid ] = useState( `ugb-admin-setting-${ i++ }` )
const isSearched = props.searchTerm && props.label.toLowerCase().includes( props.searchTerm )
const isSearched = props.searchedSettings.includes( props.label )
const mainClasses = classnames( [
'ugb-admin-setting',
props.className,
], {
[ `ugb-admin-setting--${ props.size }` ]: props.size,
'ugb-admin-setting--highlight': isSearched,
'ugb-admin-setting--not-highlight': props.searchTerm && ! isSearched,
'ugb-admin-setting--not-highlight': ! isSearched,
} )

return (
Expand Down
Loading

0 comments on commit c0848cf

Please sign in to comment.