{ "version": 3, "sources": ["../../../../../../owl-nest/ulule/features/project/src/public/views/detail/components/CreateButton.tsx"], "sourcesContent": ["import * as React from 'react'\nimport styled from 'styled-components'\n\nimport { COLORS, BREAKPOINTS, glyphs } from '@ulule/owl-kit-components/next'\n\nimport { EDIT_MODE_LAPTOP_BREAKPOINT } from '../constants'\n\ntype CreateButtonProps = {\n center?: boolean\n createHandler: () => void\n cta?: React.ReactNode\n direction?: 'column' | 'row'\n mode?: 'small' | 'normal'\n title: React.ReactNode\n isVerticalNavMenu?: boolean\n}\n\nconst Icon = styled.div<{ mode: CreateButtonProps['mode'] }>`\n align-items: center;\n background-color: ${COLORS.BLUE_SHADE_1};\n border-radius: 100%;\n display: flex;\n height: ${({ mode }) => (mode === 'small' ? '27px' : '36px')};\n justify-content: center;\n width: ${({ mode }) => (mode === 'small' ? '27px' : '36px')};\n transition: 0.3s ease;\n\n &:focus,\n &:hover,\n &:active {\n outline: none;\n }\n\n > ${glyphs.stroke.Plus} {\n color: ${COLORS.PRIMARY_BLUE_500};\n fill: ${COLORS.PRIMARY_BLUE_500};\n position: relative;\n top: -1px;\n }\n`\n\nconst Heading = styled.div<{\n center?: boolean\n direction: CreateButtonProps['direction']\n}>`\n align-items: center;\n cursor: pointer;\n display: flex;\n flex-direction: column;\n justify-content: center;\n margin: 0 auto;\n position: relative;\n top: -25%;\n\n @media screen and ${EDIT_MODE_LAPTOP_BREAKPOINT} {\n position: initial;\n top: initial;\n }\n\n @media screen and ${BREAKPOINTS.LAPTOP} {\n flex-direction: ${({ direction }) => direction};\n justify-content: ${({ center }) => (center ? 'center' : 'left')};\n margin: 0;\n\n ${Icon} {\n margin-right: ${({ direction }) => (direction === 'column' ? '0px' : '15px')};\n }\n }\n`\n\nexport function CreateButton({\n center,\n createHandler,\n cta,\n direction = 'row',\n mode,\n title,\n}: CreateButtonProps): React.ReactElement<CreateButtonProps> {\n return (\n <>\n <Heading\n center={center}\n direction={direction}\n onClick={() => {\n createHandler()\n }}\n >\n <Icon mode={mode}>\n <glyphs.stroke.Plus size={mode === 'small' ? 12 : 20} />\n </Icon>\n {title}\n </Heading>\n {cta}\n </>\n )\n}\n"], "mappings": "yLAAAA,IAAAC,IAAA,IAAAC,EAAuB,OAAvB,IAAAC,EAiBMC,EAAOC,EAAO,IAAPF,MAA+CG,EAAA,kDAEnB,0DAGqB,2CAED,uGASrC,kBACY,gBACD,uDAhBbC,EAAO,aAGjB,CAAC,CAAE,KAAAC,CAAK,IAAOA,IAAS,QAAU,OAAS,OAE5C,CAAC,CAAE,KAAAA,CAAK,IAAOA,IAAS,QAAU,OAAS,OAShDC,EAAO,OAAO,KACPF,EAAO,iBACRA,EAAO,kBAnCnBG,EAyCMC,EAAUN,EAAO,IAAPK,MAGdJ,EAAA,yMAU+C,6EAKT,2BACU,2BACiB,4BAGzD,2BACwE,qBAX5DM,EAKAC,EAAY,OACZ,CAAC,CAAE,UAAAC,CAAU,IAAMA,EAClB,CAAC,CAAE,OAAAC,CAAO,IAAOA,EAAS,SAAW,OAGtDX,EACgB,CAAC,CAAE,UAAAU,CAAU,IAAOA,IAAc,SAAW,MAAQ,QAKpE,SAASE,EAAa,CAC3B,OAAAD,EACA,cAAAE,EACA,IAAAC,EACA,UAAAJ,EAAY,MACZ,KAAAN,EACA,MAAAW,CACF,EAA6D,CAC3D,OACE,gCACE,gBAACR,EAAA,CACC,OAAQI,EACR,UAAWD,EACX,QAAS,IAAM,CACbG,EAAc,CAChB,GAEA,gBAACb,EAAA,CAAK,KAAMI,GACV,gBAACC,EAAO,OAAO,KAAd,CAAmB,KAAMD,IAAS,QAAU,GAAK,GAAI,CACxD,EACCW,CACH,EACCD,CACH,CAEJ", "names": ["init_define_process_env", "init_sentry_release_injection_stub", "React", "_a", "Icon", "src_default", "__template", "colors_exports", "mode", "glyphs_exports", "_b", "Heading", "EDIT_MODE_LAPTOP_BREAKPOINT", "breakpoints_exports", "direction", "center", "CreateButton", "createHandler", "cta", "title"] }