@@ -4,7 +4,13 @@ import React from "react";
44const button = cva ( "button" , {
55 variants : {
66 intent : {
7- primary : [ "bg-blue-600/50" , "border-blue-600" , "hover:bg-blue-600/60" , "focus:ring-blue-800" , "border-blue-600" ] ,
7+ primary : [
8+ "bg-blue-600/50" ,
9+ "border-blue-600" ,
10+ "hover:bg-blue-600/60" ,
11+ "focus:ring-blue-800" ,
12+ "border-blue-600" ,
13+ ] ,
814 secondary : [
915 "bg-emerald-600/50" ,
1016 "border-emerald-600" ,
@@ -19,22 +25,38 @@ const button = cva("button", {
1925 medium : [ "font-medium" , "py-2.5" , "px-5" , "sm:text-sm" , "text-xs" ] ,
2026 small : [ "font-small" , "py-2" , "px-2" ] ,
2127 } ,
28+ variant : {
29+ filled : [ ] ,
30+ outlined : [ "bg-transparent" , "hover:bg-opacity-10" ] ,
31+ } ,
2232 compoundVariants : {
2333 intent : [ "primary" , "secondary" ] ,
2434 size : "medium" ,
2535 } ,
2636 defaultVariants : {
2737 intent : "primary" ,
2838 size : "medium" ,
39+ variant : "filled" ,
2940 } ,
3041 } ,
3142} ) ;
3243
33- export interface ButtonProps extends React . ButtonHTMLAttributes < HTMLButtonElement > , VariantProps < typeof button > { }
44+ export interface ButtonProps
45+ extends React . ButtonHTMLAttributes < HTMLButtonElement > ,
46+ VariantProps < typeof button > { }
3447
35- export const Button : React . FC < ButtonProps > = ( { intent, size, ...props } ) => (
48+ export const Button : React . FC < ButtonProps > = ( {
49+ intent,
50+ size,
51+ variant,
52+ ...props
53+ } ) => (
3654 < button
37- className = { `${ button ( { intent, size } ) } text-white rounded-lg focus:outline-none focus:ring-1 border mb-2 sm:mb-0` }
55+ className = { `${ button ( {
56+ intent,
57+ size,
58+ variant,
59+ } ) } text-white rounded-lg focus:outline-none focus:ring-1 border mb-2 sm:mb-0`}
3860 { ...props }
3961 />
4062) ;
0 commit comments