Skip to content

Commit

Permalink
Fix search button breakpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
MytsV committed Oct 9, 2024
1 parent 56aedf1 commit 9a82a2e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/component-library/features/search/DIDSearchPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export const DIDSearchPanel = (props: SearchPanelProps) => {
/>
</div>
</div>
<SearchButton isRunning={props.isRunning} onStop={onStop} onSearch={onSearch} />
<SearchButton className="sm:w-full md:w-48" isRunning={props.isRunning} onStop={onStop} onSearch={onSearch} />
</div>
);
};
6 changes: 4 additions & 2 deletions src/component-library/features/search/SearchButton.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import React from 'react';
import { HiPlay, HiStop } from 'react-icons/hi';
import { IconButton } from '@/component-library/features/search/IconButton';
import { cn } from '@/component-library/utils';

interface SearchButtonProps {
isRunning: boolean;
onStop: (event: any) => void;
onSearch: (event: any) => void;
className?: string;
}

export const SearchButton: React.FC<SearchButtonProps> = ({ isRunning, onSearch, onStop }) => {
export const SearchButton: React.FC<SearchButtonProps> = ({ isRunning, onSearch, onStop, className }) => {
return (
<IconButton
className="sm:w-full md:w-48"
className={cn('w-full sm:w-48', className)}
icon={isRunning ? <HiStop className="text-xl" /> : <HiPlay className="text-xl" />}
onClick={isRunning ? onStop : onSearch}
variant={isRunning ? 'error' : 'success'}
Expand Down

0 comments on commit 9a82a2e

Please sign in to comment.