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
11 changes: 7 additions & 4 deletions packages/raystack/components/button/button.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Button as ButtonPrimitive } from '@base-ui/react';
import { cva, type VariantProps } from 'class-variance-authority';
import { cva, cx, type VariantProps } from 'class-variance-authority';
import { ReactNode } from 'react';

import { Spinner } from '../spinner';
Expand Down Expand Up @@ -158,7 +158,10 @@ export const Button = ({

return (
<ButtonPrimitive
className={`${button({ variant, size, color, disabled, loading, className })} ${isLoaderOnly ? getLoaderOnlyClass(size) : ''}`}
className={cx(
button({ variant, size, color, disabled, loading, className }),
isLoaderOnly && getLoaderOnlyClass(size)
)}
disabled={disabled}
style={buttonStyle}
render={render}
Expand All @@ -176,13 +179,13 @@ export const Button = ({
) : (
<>
{leadingIcon && (
<span className={`${styles['icon']} ${styles['icon-leading']}`}>
<span className={cx(styles['icon'], styles['icon-leading'])}>
{leadingIcon}
</span>
)}
{children}
{trailingIcon && (
<span className={`${styles['icon']} ${styles['icon-trailing']}`}>
<span className={cx(styles['icon'], styles['icon-trailing'])}>
{trailingIcon}
</span>
)}
Expand Down
4 changes: 2 additions & 2 deletions packages/raystack/components/callout/callout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { InfoCircledIcon } from '@radix-ui/react-icons';
import { cva, type VariantProps } from 'class-variance-authority';
import { cva, cx, type VariantProps } from 'class-variance-authority';
import { type ComponentProps, type CSSProperties, type ReactNode } from 'react';

import styles from './callout.module.css';
Expand Down Expand Up @@ -73,7 +73,7 @@ export function Callout({

return (
<div
className={`${callout({ type, outline, highContrast })} ${className || ''}`}
className={callout({ type, outline, highContrast, className })}
style={combinedStyle}
role={getRole()}
aria-live={type === 'alert' ? 'assertive' : 'polite'}
Expand Down
3 changes: 2 additions & 1 deletion packages/raystack/components/menu/menu-trigger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { Autocomplete as AutocompletePrimitive } from '@base-ui/react';
import { Menu as MenuPrimitive } from '@base-ui/react/menu';
import { cx } from 'class-variance-authority';
import { TriangleRightIcon } from '~/icons';
import { Button } from '../button';
import { useMenubarContext } from '../menubar/menubar';
Expand All @@ -27,7 +28,7 @@ export function MenuTrigger({
variant='text'
color='neutral'
size='small'
className={`${styles.menuBarTrigger} rs-menu-trigger`}
className={cx(styles.menuBarTrigger, 'rs-menu-trigger')}
/>
) : undefined;

Expand Down
Loading