{"version":3,"file":"Button.CmwbFPRa.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/rKDc5Q9h9r64AQAxdZLK/oCt3j981YIfnN0MPupQF/Button.js"],"sourcesContent":["// Button component with customizable background, hover color, text color, radius, and link\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,startTransition}from\"react\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function Button(props){const{text,backgroundColor,hoverColor,textColor,borderRadius,link,font,width,height,style}=props;const[isHovered,setIsHovered]=useState(false);const handleMouseEnter=()=>{startTransition(()=>setIsHovered(true));};const handleMouseLeave=()=>{startTransition(()=>setIsHovered(false));};const isFixedWidth=style?.width===\"100%\";const isFixedHeight=style?.height===\"100%\";const effectiveWidth=isFixedWidth?\"100%\":width===\"fill\"?\"100%\":width===\"fit\"?\"fit-content\":style?.width||\"auto\";const effectiveHeight=isFixedHeight?\"100%\":height===\"fill\"?\"100%\":height===\"fit\"?\"fit-content\":style?.height||\"auto\";const buttonStyle={position:\"relative\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:\"12px 24px\",backgroundColor:isHovered?hoverColor:backgroundColor,color:textColor,borderRadius:borderRadius,border:\"none\",cursor:\"pointer\",textDecoration:\"none\",transition:\"background-color 0.2s ease\",...font,width:effectiveWidth,height:effectiveHeight,minWidth:0,minHeight:0};const content=/*#__PURE__*/_jsx(\"span\",{children:text});if(link){return /*#__PURE__*/_jsx(\"a\",{href:link,style:buttonStyle,onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,children:content});}return /*#__PURE__*/_jsx(\"button\",{style:buttonStyle,onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,children:content});}addPropertyControls(Button,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Button\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#000000\"},hoverColor:{type:ControlType.Color,title:\"Hover Color\",defaultValue:\"#333333\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"},borderRadius:{type:ControlType.BorderRadius,title:\"Radius\",defaultValue:\"0px\"},link:{type:ControlType.Link,title:\"Link\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"14px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}},width:{type:ControlType.Enum,title:\"Width\",options:[\"fixed\",\"fill\",\"fit\"],optionTitles:[\"Fixed\",\"Fill\",\"Fit Content\"],defaultValue:\"fill\",displaySegmentedControl:true},height:{type:ControlType.Enum,title:\"Height\",options:[\"fixed\",\"fill\",\"fit\"],optionTitles:[\"Fixed\",\"Fill\",\"Fit Content\"],defaultValue:\"fit\",displaySegmentedControl:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Button\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Button.map"],"mappings":"iLAIG,SAAwB,EAAO,EAAM,CAAC,GAAK,CAAC,OAAK,kBAAgB,aAAW,YAAU,eAAa,OAAK,OAAK,QAAM,SAAO,SAAO,EAAW,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAO,MAAqB,CAAC,MAAoB,EAAa,GAAK,CAAC,EAAS,MAAqB,CAAC,MAAoB,EAAa,GAAM,CAAC,EAAS,EAAa,GAAO,QAAQ,OAAa,EAAc,GAAO,SAAS,OAAa,EAAe,GAAoB,IAAQ,OAAf,OAA6B,IAAQ,MAAM,cAAc,GAAO,OAAO,OAAa,EAAgB,GAAqB,IAAS,OAAhB,OAA8B,IAAS,MAAM,cAAc,GAAO,QAAQ,OAAa,EAAY,CAAC,SAAS,WAAW,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,QAAQ,YAA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