Skip to content

Commit

Permalink
add kodiui
Browse files Browse the repository at this point in the history
  • Loading branch information
dinoDanic committed Feb 27, 2024
1 parent bc02fc1 commit 1e60c93
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 24 deletions.
8 changes: 4 additions & 4 deletions apps/bible/components/typography/heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ type HeadingProps = VariantProps<typeof headingVariants> &
className?: string;
};

const headingVariants = cva("m-0 p-0", {
const headingVariants = cva("", {
variants: {
level: {
"1": "text-4xl lg:text-5xl leading-none",
"2": "text-3xl transition-colors first:mt-0 leading-none",
"2": "text-3xl leading-none",
"3": "text-2xl leading-none",
"4": "text-xl leading-none",
},
Expand All @@ -31,15 +31,15 @@ const headingVariants = cva("m-0 p-0", {

const Heading = React.forwardRef<HTMLHeadingElement, HeadingProps>(
(
{ level = "1", children, className, textAlign, weight, color, ...props },
{ level = "1", children, className, textAlign, weight, tone, ...props },
ref
) => {
const Comp = `h${level}` as "h1" | "h2" | "h3" | "h4";
return (
<Comp
className={cn(
headingVariants({ level, weight }),
textVariants({ textAlign, color }),
textVariants({ textAlign, tone }),
className
)}
ref={ref}
Expand Down
23 changes: 4 additions & 19 deletions apps/bible/components/typography/text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,39 +24,24 @@ const textCustomVariants = cva("inline-block [&>svg]:inline-block", {
medium: "font-medium",
bold: "font-bold",
},
tone: {
base: "text-white",
muted: "text-gray-500",
},
},
defaultVariants: {
size: "base",
size: "sm",
weight: "base",
tone: "base",
},
});

const Text = React.forwardRef<HTMLParagraphElement, TextProps>(
(
{
withIcon,
size,
weight,
className,
tone,
color,
children,
textAlign,
...props
},
{ withIcon, size, weight, className, tone, children, textAlign, ...props },
ref
) => {
const Comp = withIcon ? "span" : "p";
return (
<Comp
className={cn(
textCustomVariants({ size, weight, tone, className }),
textVariants({ textAlign, color })
textCustomVariants({ size, weight, className }),
textVariants({ textAlign, tone })
)}
ref={ref}
{...props}
Expand Down
2 changes: 1 addition & 1 deletion apps/bible/components/typography/tokens/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const textVariants = cva("", {
start: "text-start",
end: "text-end",
},
color: {
tone: {
brand: "text-brand",
muted: "text-muted-foreground",
},
Expand Down

0 comments on commit 1e60c93

Please sign in to comment.