Readyish for prod!
This commit is contained in:
@ -4,3 +4,17 @@ import { twMerge } from 'tailwind-merge';
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
return twMerge(clsx(inputs));
|
||||
}
|
||||
|
||||
export const makeConditionalClassName = ({
|
||||
context,
|
||||
defaultClassName,
|
||||
on = '',
|
||||
off = '',
|
||||
}: {
|
||||
context: boolean;
|
||||
defaultClassName: string;
|
||||
on?: string;
|
||||
off?: string;
|
||||
}) => {
|
||||
return defaultClassName + ' ' + (context ? on : off);
|
||||
};
|
||||
|
Reference in New Issue
Block a user