| 
									
										
										
										
											2021-08-23 12:45:25 +00:00
										 |  |  | import { PlusIcon } from "@heroicons/react/solid"; | 
					
						
							|  |  |  | import React from "react"; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-03-16 23:36:43 +00:00
										 |  |  | import { Button, ButtonBaseProps } from "@calcom/ui/Button"; | 
					
						
							| 
									
										
										
										
											2021-09-22 19:52:38 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-10-12 09:35:44 +00:00
										 |  |  | import { sandboxPage } from "."; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const page = sandboxPage(function ButtonPage() { | 
					
						
							|  |  |  |   const list: ButtonBaseProps[] = [ | 
					
						
							| 
									
										
										
										
											2021-08-23 12:45:25 +00:00
										 |  |  |     // primary
 | 
					
						
							|  |  |  |     { color: "primary" }, | 
					
						
							|  |  |  |     { color: "primary", disabled: true }, | 
					
						
							|  |  |  |     { color: "primary", disabled: true, loading: true }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // secondary
 | 
					
						
							|  |  |  |     { color: "secondary" }, | 
					
						
							|  |  |  |     { color: "secondary", disabled: true }, | 
					
						
							|  |  |  |     { color: "secondary", disabled: true, loading: true }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // minimal
 | 
					
						
							|  |  |  |     { color: "minimal" }, | 
					
						
							|  |  |  |     { color: "minimal", disabled: true }, | 
					
						
							|  |  |  |     { color: "minimal", disabled: true, loading: true }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     // sizes
 | 
					
						
							|  |  |  |     { color: "primary", size: "sm" }, | 
					
						
							|  |  |  |     { color: "primary", size: "base" }, | 
					
						
							|  |  |  |     { color: "primary", size: "lg" }, | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-10-12 09:35:44 +00:00
										 |  |  |     // // href
 | 
					
						
							|  |  |  |     // { href: "/staging" },
 | 
					
						
							|  |  |  |     // { href: "/staging", disabled: true },
 | 
					
						
							| 
									
										
										
										
											2021-08-23 12:45:25 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     { StartIcon: PlusIcon }, | 
					
						
							|  |  |  |     { EndIcon: PlusIcon }, | 
					
						
							|  |  |  |   ]; | 
					
						
							|  |  |  |   return ( | 
					
						
							|  |  |  |     <> | 
					
						
							| 
									
										
										
										
											2022-02-09 00:05:13 +00:00
										 |  |  |       <div className="bg-gray-200 p-4"> | 
					
						
							| 
									
										
										
										
											2021-08-23 12:45:25 +00:00
										 |  |  |         <h1>Button component</h1> | 
					
						
							|  |  |  |         <div className="flex flex-col"> | 
					
						
							|  |  |  |           {list.map((props, index) => ( | 
					
						
							| 
									
										
										
										
											2022-02-09 00:05:13 +00:00
										 |  |  |             <div key={index} className="m-2 bg-white p-2"> | 
					
						
							| 
									
										
										
										
											2021-08-23 12:45:25 +00:00
										 |  |  |               <h3> | 
					
						
							|  |  |  |                 <code> | 
					
						
							|  |  |  |                   {JSON.stringify( | 
					
						
							|  |  |  |                     props, | 
					
						
							|  |  |  |                     (key, value) => { | 
					
						
							|  |  |  |                       if (key.includes("Icon")) { | 
					
						
							|  |  |  |                         return ".."; | 
					
						
							|  |  |  |                       } | 
					
						
							|  |  |  |                       return value; | 
					
						
							|  |  |  |                     }, | 
					
						
							|  |  |  |                     2 | 
					
						
							|  |  |  |                   )} | 
					
						
							|  |  |  |                 </code> | 
					
						
							|  |  |  |               </h3> | 
					
						
							| 
									
										
										
										
											2021-10-12 09:35:44 +00:00
										 |  |  |               <Button {...(props as any)}>Button text</Button> | 
					
						
							| 
									
										
										
										
											2021-08-23 12:45:25 +00:00
										 |  |  |             </div> | 
					
						
							|  |  |  |           ))} | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |       </div> | 
					
						
							|  |  |  |     </> | 
					
						
							|  |  |  |   ); | 
					
						
							| 
									
										
										
										
											2021-10-12 09:35:44 +00:00
										 |  |  | }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export default page.default; | 
					
						
							|  |  |  | export const getStaticProps = page.getStaticProps; |