mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Styling and icon fixes for cart sidebar
This commit is contained in:
@@ -16,6 +16,7 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
||||
active?: boolean
|
||||
type?: 'submit' | 'reset' | 'button'
|
||||
Component?: string | JSXElementConstructor<any>
|
||||
width?: string | number
|
||||
}
|
||||
|
||||
const Button: React.FC<ButtonProps> = forwardRef((props, buttonRef) => {
|
||||
@@ -27,6 +28,7 @@ const Button: React.FC<ButtonProps> = forwardRef((props, buttonRef) => {
|
||||
active,
|
||||
onClick,
|
||||
disabled,
|
||||
width,
|
||||
Component = 'button',
|
||||
...rest
|
||||
} = props
|
||||
@@ -59,6 +61,9 @@ const Button: React.FC<ButtonProps> = forwardRef((props, buttonRef) => {
|
||||
ref={mergeRefs([ref, buttonRef])}
|
||||
{...rest}
|
||||
{...buttonProps}
|
||||
style={{
|
||||
width,
|
||||
}}
|
||||
data-active={isPressed ? '' : undefined}
|
||||
>
|
||||
{children}
|
||||
|
@@ -72,8 +72,8 @@ const Sidebar: FC<Props> = ({ className, children, show = true, close }) => {
|
||||
leaveFrom="translate-x-0"
|
||||
leaveTo="translate-x-full"
|
||||
>
|
||||
<div className="h-full w-screen max-w-2xl">
|
||||
<div className="h-full flex flex-col space-y-6 bg-white shadow-xl overflow-y-auto">
|
||||
<div className="h-full w-screen max-w-md">
|
||||
<div className="h-full flex flex-col bg-white shadow-xl overflow-y-auto">
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user