Skip to content

Commit

Permalink
chore: add placehoder to search in storage
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbrusegard committed Sep 23, 2024
1 parent 7e51c90 commit a4450c1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
},
"storage": {
"title": "Storage",
"searchPlaceholder": "Search for product...",
"card": {
"quantityInfo": "{quantity} units",
"addToCart": "Add to cart",
Expand Down
1 change: 1 addition & 0 deletions messages/no.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
},
"storage": {
"title": "Lager",
"searchPlaceholder": "Søk etter produkt...",
"card": {
"quantityInfo": "{quantity} stk.",
"addToCart": "Legg i handlekurven",
Expand Down
5 changes: 4 additions & 1 deletion src/app/[locale]/(default)/storage/(main)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ export default function StorageLayout({
</TooltipProvider>
</div>
<div className='my-4 flex flex-col justify-center gap-2 lg:flex-row'>
<SearchBar className='lg:max-w-2xl' />
<SearchBar
className='lg:max-w-2xl'
placeholder={t('searchPlaceholder')}
/>
<Suspense fallback={<SelectorsSkeleton />}>
<SortSelector
filters={filters}
Expand Down
1 change: 1 addition & 0 deletions src/components/composites/PaginationCarousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
} from '@/components/ui/Pagination';
import { cx } from '@/lib/utils';
import { parseAsInteger, useQueryState } from 'nuqs';

type PaginationCarouselProps = {
className?: string;
totalPages: number;
Expand Down
2 changes: 1 addition & 1 deletion src/components/composites/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const SearchBar = React.forwardRef<HTMLInputElement, SearchBarProps>(
({ className, ...props }, ref) => {
return (
<div className={cx('relative flex items-center', className)}>
<SearchIcon className='absolute left-2 size-4' />
<SearchIcon className='absolute left-2 size-4 text-muted-foreground' />
<Input className='pl-8' ref={ref} {...props} />
</div>
);
Expand Down

0 comments on commit a4450c1

Please sign in to comment.