{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/i8Zybvnj3WhJZbepRyhs/ev0wAdEcyZbwBAHjnSY5/ScrollToTopButton.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";import{cloneElement}from\"react\";function scrollToTop(){if(window){window.scrollTo({top:0,behavior:\"smooth\"});}}/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerIntrinsicWidth 40\n * @framerIntrinsicHeight 40\n */ export default function ScrollToTopButton(props){let button;if(props.buttonType==\"default\"){button=/*#__PURE__*/ _jsx(\"div\",{style:{width:props.buttonWidth,height:props.buttonHeight,display:\"flex\",justifyContent:\"center\",alignItems:\"center\",backgroundColor:props.fill,borderRadius:props.radiusIsMixed?`${props.radiusTopLeft}px ${props.radiusTopRight}px ${props.radiusBottomRight}px ${props.radiusBottomLeft}px`:`${props.radius}px`,...props.style},onClick:scrollToTop,children:/*#__PURE__*/ _jsxs(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",fill:\"none\",viewBox:\"0 0 24 24\",strokeWidth:props.icon.stroke,stroke:props.icon.color,\"stroke-linecap\":\"round\",\"stroke-linejoin\":\"round\",style:{width:props.icon.size,height:props.icon.size},children:[/*#__PURE__*/ _jsx(\"path\",{d:\"M12 5l0 14\"}),/*#__PURE__*/ _jsx(\"path\",{d:\"M18 11l-6 -6\"}),/*#__PURE__*/ _jsx(\"path\",{d:\"M6 11l6 -6\"})]})});}else{var ref,ref1,ref2;let layer=(ref=props.custom)===null||ref===void 0?void 0:ref[0];if(layer&&(((ref1=props.style)===null||ref1===void 0?void 0:ref1.width)||((ref2=props.style)===null||ref2===void 0?void 0:ref2.height))){layer=/*#__PURE__*/ cloneElement(layer,{style:{...layer.props.style,...props.style}});}button=/*#__PURE__*/ _jsx(\"div\",{onClick:scrollToTop,style:props.style,children:layer});}let layer1=button;if(props.effects){layer1=/*#__PURE__*/ _jsx(motion.div,{whileHover:{scale:props.effects.hoverScale},whileTap:{scale:props.effects.pressScale},initial:false,transition:props.effects.transition,style:props.style,children:button});}return layer1;};ScrollToTopButton.displayName=\"Scroll-to-Top Button\";const effectsDefault={hoverScale:1.1,pressScale:.9};addPropertyControls(ScrollToTopButton,{buttonType:{type:ControlType.Enum,defaultValue:\"default\",options:[\"default\",\"custom\"],optionTitles:[\"Default\",\"Custom\"],displaySegmentedControl:true,title:\"Button\"},custom:{type:ControlType.ComponentInstance,title:\"Custom\",description:\"Use a custom button layer.\",hidden(props){return props.buttonType!==\"custom\";}},fill:{type:ControlType.Color,defaultValue:\"#EDEDED\",optional:true,hidden(props){return props.buttonType!==\"default\";}},icon:{type:ControlType.Object,controls:{color:{type:ControlType.Color,defaultValue:\"black\"},size:{type:ControlType.Number,defaultValue:24,min:1},stroke:{type:ControlType.Number,defaultValue:2,min:1,max:10,step:.1}},hidden(props){return props.buttonType!==\"default\";}},radius:{type:ControlType.FusedNumber,defaultValue:20,toggleKey:\"radiusIsMixed\",toggleTitles:[\"All\",\"Individual\"],valueKeys:[\"radiusTopLeft\",\"radiusTopRight\",\"radiusottomRight\",\"radiusBottomLeft\",],valueLabels:[\"TL\",\"TR\",\"BR\",\"BL\"],min:0,hidden(props){return props.buttonType!==\"default\";}},effects:{type:ControlType.Object,defaultValue:effectsDefault,optional:true,buttonTitle:\"Hover & Press\",icon:\"effect\",controls:{hoverScale:{type:ControlType.Number,defaultValue:effectsDefault.hoverScale,min:0,step:.01,displayStepper:true},pressScale:{type:ControlType.Number,defaultValue:effectsDefault.pressScale,min:0,step:.01,displayStepper:true},transition:{type:ControlType.Transition}}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ScrollToTopButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"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AAa,GAAG,UAAU,gBAAgB,aAAa,CAAC,MAAM,YAAY,EAAE,UAAU,CAAC,gBAAgB,iBAAiB,mBAAmB,kBAAmB,EAAE,YAAY,CAAC,KAAK,KAAK,KAAK,IAAI,EAAE,IAAI,EAAE,OAAOb,EAAM,CAAC,OAAOA,EAAM,aAAa,SAAU,CAAC,EAAE,QAAQ,CAAC,KAAKa,EAAY,OAAO,aAAaF,EAAe,SAAS,GAAK,YAAY,gBAAgB,KAAK,SAAS,SAAS,CAAC,WAAW,CAAC,KAAKE,EAAY,OAAO,aAAaF,EAAe,WAAW,IAAI,EAAE,KAAK,IAAI,eAAe,EAAI,EAAE,WAAW,CAAC,KAAKE,EAAY,OAAO,aAAaF,EAAe,WAAW,IAAI,EAAE,KAAK,IAAI,eAAe,EAAI,EAAE,WAAW,CAAC,KAAKE,EAAY,UAAU,CAAC,CAAC,CAAC,CAAC",
  "names": ["scrollToTop", "window", "ScrollToTopButton", "props", "button", "p", "u", "ref", "ref1", "ref2", "layer", "q", "layer1", "motion", "effectsDefault", "addPropertyControls", "ControlType"]
}
