Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
clmntsnr committed Dec 13, 2024
1 parent 915c58b commit b9d5ee1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 25 deletions.
4 changes: 2 additions & 2 deletions src/components/primitives/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const checkboxStyles = tv({
},
checked: {
true: "",
false: "bg-main-0"
false: "bg-main-0",
},
size: {
xs: "min-h-sm px-xs*2 py-x !m-xs text-xs rounded-xs gap-xs",
Expand All @@ -30,7 +30,7 @@ export const checkboxStyles = tv({
defaultVariants: {
look: "base",
size: "md",
},
},
});

export type CheckboxProps = Component<Styled<typeof checkboxStyles> & { state?: GetSet<boolean> }, RadixCheckboxProps>;
Expand Down
25 changes: 4 additions & 21 deletions src/components/primitives/Divider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const dividerStyles = tv(
{ look: "hype", vertical: true, class: "border-r-2" },
],
},
{ twMerge: false }
{ twMerge: false },
);

export type DividerProps = Component<
Expand All @@ -43,25 +43,8 @@ export type DividerProps = Component<
}
>;

export default function Divider({
vertical = false,
horizontal = true,
look,
className,
...props
}: DividerProps) {
if (horizontal && !vertical)
return (
<div
className={mergeClass(dividerStyles({ look }), className)}
{...props}
/>
);
export default function Divider({ vertical = false, horizontal = true, look, className, ...props }: DividerProps) {
if (horizontal && !vertical) return <div className={mergeClass(dividerStyles({ look }), className)} {...props} />;

return (
<div
className={mergeClass(dividerStyles({ look, vertical: true }), className)}
{...props}
/>
);
return <div className={mergeClass(dividerStyles({ look, vertical: true }), className)} {...props} />;
}
2 changes: 1 addition & 1 deletion src/components/primitives/Title.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import clsx from "clsx";
import { forwardRef } from "react";
import { tv } from "tailwind-variants";
import type { Component, Styled } from "../../utils/types";
import { textStyles } from "./Text";
import React, { forwardRef, useEffect, useRef } from "react";

export const titleStyles = tv(
{
Expand Down
2 changes: 1 addition & 1 deletion src/utils/tailwind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const generateTailwindConfig = () =>
slideLeftAndFade: "slideLeftAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)",
slideUpAndFade: "slideUpAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)",
slideRightAndFade: "slideRightAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)",
textScroll: "textScroll 5s linear"
textScroll: "textScroll 5s linear",
},
},
colors: {
Expand Down

0 comments on commit b9d5ee1

Please sign in to comment.