Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/shared/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export { FileUpload } from './ui/FileUpload/FileUpload';
export { Flex } from './ui/Flex';
export { Icon } from './ui/Icon';
export { IconButton } from './ui/IconButton';
export { Input } from './ui/Input/Input';
export { Input } from './ui/Input';
export { ImageGallery } from './ui/ImageGallery';
export { Modal } from './ui/Modal';
export { MediaUpload } from './ui/MediaUpload';
Expand Down
24 changes: 19 additions & 5 deletions src/shared/ui/Select/SelectButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,46 @@ type Props = {
* The size of the button.
*/
size?: 'md' | 'lg';
/**
* Custom class name for styling.
*/
className?: string;
};

const sizeVariants = {
md: 'px-3 py-1 text-sm min-w-24',
lg: 'px-4 py-3.5 min-w-64 text-lg',
md: 'px-3 py-1 text-sm min-w-24 rounded-lg',
lg: 'px-4 py-3.5 min-w-64 min-h-[52px] rounded-xl',
} as const;

export function SelectButton({ selected, onClick, isOpen, size = 'lg' }: Props) {
export function SelectButton({
selected,
onClick,
isOpen,
size = 'lg',
className,
...props
}: Props) {
return (
<Flex
alignItems="center"
onClick={onClick}
className={cn(
sizeVariants[size],
'w-full rounded-lg border border-gray-200 bg-white font-semibold text-gray-400'
'w-full border border-gray-200 bg-white font-semibold text-gray-400',
className
)}
{...props}
>
<button
type="button"
className={cn(
'flex w-full cursor-pointer items-center justify-between rounded-lg align-middle',
'flex w-full cursor-pointer items-center justify-between rounded-xl align-middle leading-none',
isOpen && 'hover:rounded-b-none'
)}
>
{selected}
<Icon
size={20}
name="arrowDown"
className={cn(
'transform transition-transform duration-300',
Expand Down
4 changes: 4 additions & 0 deletions src/shared/ui/assets/drag.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/shared/ui/assets/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Check from './check.svg';
import Close from './close.svg';
import Dots from './dots.svg';
import DownLoad from './download.svg';
import Drag from './drag.svg';
import Dustpan from './dustpan.svg';
import Etc from './etc.svg';
import File from './file.svg';
Expand Down Expand Up @@ -39,6 +40,7 @@ export const Icons = {
camera: Camera,
chart: Chart,
download: DownLoad,
drag: Drag,
dots: Dots,
dustpan: Dustpan,
peoples: Peoples,
Expand Down
Loading