diff --git a/lib/platform-bible-react/src/components/advanced/tab-navigation-content-search.component.tsx b/lib/platform-bible-react/src/components/advanced/tab-navigation-content-search.component.tsx index 4bb4aeccb5..13ae86bce8 100644 --- a/lib/platform-bible-react/src/components/advanced/tab-navigation-content-search.component.tsx +++ b/lib/platform-bible-react/src/components/advanced/tab-navigation-content-search.component.tsx @@ -25,9 +25,6 @@ export type TabNavigationContentSearchProps = { /** Optional title to include in the header */ headerTitle?: string; - - /** Optional flag to make the search bar appear full width */ - isSearchBarFullWidth?: boolean; }; export default function TabNavigationContentSearch({ @@ -35,14 +32,12 @@ export default function TabNavigationContentSearch({ onSearch, searchPlaceholder, headerTitle, - isSearchBarFullWidth = false, }: TabNavigationContentSearchProps) { return (
{headerTitle ?

{headerTitle}

: ''} diff --git a/lib/platform-bible-react/src/components/basics/search-bar.component.tsx b/lib/platform-bible-react/src/components/basics/search-bar.component.tsx index de8568b873..17e905dc27 100644 --- a/lib/platform-bible-react/src/components/basics/search-bar.component.tsx +++ b/lib/platform-bible-react/src/components/basics/search-bar.component.tsx @@ -17,9 +17,6 @@ export type SearchBarProps = { /** Optional string that appears in the search bar without a search string */ placeholder?: string; - /** Optional boolean to set the input base to full width */ - isFullWidth?: boolean; - /** Additional css classes to help with unique styling of the search bar */ className?: string; }; @@ -27,7 +24,6 @@ export type SearchBarProps = { export default function SearchBar({ onSearch, placeholder, - isFullWidth, className, }: SearchBarProps) { const [searchQuery, setSearchQuery] = useState(''); @@ -40,7 +36,7 @@ export default function SearchBar({ const dir: Direction = readDirection(); return ( -
+
handleInputChange(e.target.value)} @@ -63,13 +59,11 @@ export default function SearchBar({ { 'tw-left-0': dir === 'rtl' }, { 'tw-right-0': dir === 'ltr' }, )} + onClick={() => { + handleInputChange(''); + }} > - { - handleInputChange(''); - }} - /> + Clear )} diff --git a/lib/platform-bible-react/src/preview/pages/components/advanced.component.tsx b/lib/platform-bible-react/src/preview/pages/components/advanced.component.tsx index 6e91365a3a..33872e81d6 100644 --- a/lib/platform-bible-react/src/preview/pages/components/advanced.component.tsx +++ b/lib/platform-bible-react/src/preview/pages/components/advanced.component.tsx @@ -20,6 +20,7 @@ import ScriptureResultsViewerExample from './advanced/scripture-results-viewer.e import SettingsListExamples from './advanced/settings-list.examples.component'; import { columns, data } from './data-sources/data-table-content'; import UiLanguageSelectorExample from './advanced/ui-language-selector-example.component'; +import SettingSidebarContentSearchExamples from './advanced/settings-sidebar-content-search.example.component'; function Compositions() { const [scrRef, setScrRef] = useState(defaultScrRef); @@ -85,6 +86,9 @@ function Compositions() { Scroll Group Selector + + Settings Sidebar Content Search + Markdown Renderer UI Language Selector @@ -139,7 +143,6 @@ function Compositions() { tabList={tabList} onSearch={handleSearchChange} searchPlaceholder="Search..." - isSearchBarFullWidth /> @@ -160,6 +163,10 @@ function Compositions() {
Scroll Group Id: {`${scrollGroupId}`}
+ + + + diff --git a/lib/platform-bible-react/src/preview/pages/components/advanced/settings-sidebar-content-search.example.component.tsx b/lib/platform-bible-react/src/preview/pages/components/advanced/settings-sidebar-content-search.example.component.tsx new file mode 100644 index 0000000000..c26fe5b201 --- /dev/null +++ b/lib/platform-bible-react/src/preview/pages/components/advanced/settings-sidebar-content-search.example.component.tsx @@ -0,0 +1,24 @@ +import SettingsSidebarContentSearch from '@/components/advanced/settings-components/settings-sidebar-content-search.component'; + +export default function SettingSidebarContentSearchExamples() { + return ( +
+ + console.log('Selected:', key, projId) + } + onSearch={(query) => console.log('Searching for:', query)} + /> +
+ ); +} diff --git a/lib/platform-bible-react/src/preview/pages/layouts/resource-manager.layout.component.tsx b/lib/platform-bible-react/src/preview/pages/layouts/resource-manager.layout.component.tsx index a4ad822d1e..71575856ee 100644 --- a/lib/platform-bible-react/src/preview/pages/layouts/resource-manager.layout.component.tsx +++ b/lib/platform-bible-react/src/preview/pages/layouts/resource-manager.layout.component.tsx @@ -20,7 +20,6 @@ import { TableHeader, TableRow, } from '@/components/shadcn-ui/table'; -import { cn } from '@/utils/shadcn-ui.util'; import { DialogTitle } from '@radix-ui/react-dialog'; import MultiSelectComboBox from '@/components/advanced/multi-select-combo-box'; @@ -237,11 +236,7 @@ export default function GetResourcesExample() {
- +