Skip to content
Open
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
16 changes: 8 additions & 8 deletions packages/nitro-react/src/components/CloseButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { forwardRef, type HTMLAttributes } from 'react';

import { cn, cva, type VariantProps } from '#base/utils';

const closebuttonVariantsConfig = {
const closeButtonVariantsConfig = {
variant: {
// default
'0': '[border-image-source:var(--closebutton-0-default-src)] [border-image-slice:0_0_0_0_fill] [border-image-width:0px_0px_0px_0px] [border-image-repeat:stretch] hover:[border-image-source:var(--closebutton-0-hovering-src)] hover:[border-image-slice:0_0_0_0_fill] hover:[border-image-width:0px_0px_0px_0px] hover:[border-image-repeat:stretch] active:[border-image-source:var(--closebutton-0-pressed-src)] active:[border-image-slice:0_0_0_0_fill] active:[border-image-width:0px_0px_0px_0px] active:[border-image-repeat:stretch]',
Expand All @@ -17,30 +17,30 @@ const closebuttonVariantsConfig = {
},
} as const;

const closebuttonVariants = cva(
const closeButtonVariants = cva(
'',
{
variants: closebuttonVariantsConfig,
variants: closeButtonVariantsConfig,
defaultVariants: {
variant: '0',
},
}
);

type ClosebuttonVariantProps = VariantProps<typeof closebuttonVariantsConfig>;
type CloseButtonVariantProps = VariantProps<typeof closeButtonVariantsConfig>;

interface ClosebuttonProps extends HTMLAttributes<HTMLDivElement>, ClosebuttonVariantProps {
interface CloseButtonProps extends HTMLAttributes<HTMLDivElement>, CloseButtonVariantProps {
className?: string;
}

export const Closebutton = forwardRef<HTMLDivElement, ClosebuttonProps>(
export const CloseButton = forwardRef<HTMLDivElement, CloseButtonProps>(
({ className, variant, ...props }, ref) => (
<div
ref={ref}
className={cn(closebuttonVariants({ variant }), className)}
className={cn(closeButtonVariants({ variant }), className)}
{...props}
/>
)
);

Closebutton.displayName = 'Closebutton';
CloseButton.displayName = 'CloseButton';
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { FurniturePickupMode, IRoomFurnitureData } from "@nitrodevco/nitro-api";

import { Border, Button } from "#base/components";
import { CloseButton } from "#base/components/Closebutton";
import { CloseButton } from "#base/components/CloseButton";
import { FurnitureImage } from "#base/components/FurnitureImage";
import { useLocalizationStore } from "#base/stores";

Expand Down