Skip to content

Design updates for web-sdk wallet widget v2 #118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
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
8 changes: 6 additions & 2 deletions src/components/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export interface ModalProps extends VariantProps<typeof modalContentVariants> {
footer?: React.ReactNode
scroll?: boolean
isDismissible?: boolean
showCloseButton?: boolean
onClose?: () => void

backdropColor?: string
Expand All @@ -62,6 +63,7 @@ export interface ModalProps extends VariantProps<typeof modalContentVariants> {
[key: string]: unknown
}
title?: string
closeButtonSize?: 'lg' | 'md' | 'sm' | 'xs'
}

export const Modal = (props: PropsWithChildren<ModalProps>) => {
Expand All @@ -73,13 +75,15 @@ export const Modal = (props: PropsWithChildren<ModalProps>) => {
children,
disableAnimation = false,
isDismissible = true,
showCloseButton = true,
onClose,
scroll = true,
size = 'lg',
overlayProps,
contentProps,
rootProps = {},
title = 'Modal dialog',
closeButtonSize = 'xs',
} = props

const { container } = useTheme()
Expand Down Expand Up @@ -163,11 +167,11 @@ export const Modal = (props: PropsWithChildren<ModalProps>) => {
{children}
</ContentWrapper>
{footer && <ModalFooter>{footer}</ModalFooter>}
{isDismissible && (
{isDismissible && showCloseButton && (
<ModalPrimitive.Close asChild>
<IconButton
icon={CloseIcon}
size="xs"
size={closeButtonSize}
className="absolute right-4 top-4 z-20 backdrop-blur-xs"
aria-label="Close"
/>
Expand Down
6 changes: 4 additions & 2 deletions src/components/TextInput/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export interface TextInputProps
name: string
numeric?: boolean
controls?: ReactNode
height?: string
}

export const TextInput = forwardRef<HTMLInputElement, TextInputProps>(
Expand All @@ -47,6 +48,7 @@ export const TextInput = forwardRef<HTMLInputElement, TextInputProps>(
rightIcon: RightIcon,
name,
controls,
height = '52px',
type = 'text',
numeric = false,
className,
Expand All @@ -69,8 +71,7 @@ export const TextInput = forwardRef<HTMLInputElement, TextInputProps>(
<div className="w-full">
<div
className={cn(
'inline-flex items-center bg-transparent text-primary min-w-full px-4 gap-2 rounded-xl',
'h-[52px] cursor-text',
'inline-flex items-center bg-transparent text-primary min-w-full px-4 gap-2 rounded-xl cursor-text',
'ring-inset ring-1 ring-border-normal focus-within:ring-2 focus-within:ring-border-focus focus-within:opacity-100',
error
? 'ring-border-error focus-within:ring-border-error'
Expand All @@ -79,6 +80,7 @@ export const TextInput = forwardRef<HTMLInputElement, TextInputProps>(
'cursor-default opacity-50': disabled,
}
)}
style={{ height }}
>
{LeftIcon && <LeftIcon size="sm" />}

Expand Down