{"version":3,"file":"TextButton.mjs","names":[],"sources":["../../../src/text-button/TextButton.tsx"],"sourcesContent":["/*!\n *\n *  Copyright (c) \"Neo4j\"\n *  Neo4j Sweden AB [http://neo4j.com]\n *\n *  This file is part of Neo4j.\n *\n *  Neo4j is free software: you can redistribute it and/or modify\n *  it under the terms of the GNU General Public License as published by\n *  the Free Software Foundation, either version 3 of the License, or\n *  (at your option) any later version.\n *\n *  This program is distributed in the hope that it will be useful,\n *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n *  GNU General Public License for more details.\n *\n *  You should have received a copy of the GNU General Public License\n *  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport type React from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport {\n  ButtonBase,\n  type ButtonVariants,\n  type CommonButtonProps,\n} from '../button/ButtonBase';\n\ntype TextButtonProps = CommonButtonProps & {\n  /** Variant of the button */\n  variant?: ButtonVariants;\n};\n\nexport const TextButton = <T extends React.ElementType = 'button'>({\n  children,\n  as,\n  type = 'button',\n  isLoading = false,\n  variant = 'primary',\n  isDisabled = false,\n  size = 'medium',\n  onClick,\n  className,\n  style,\n  htmlAttributes,\n  ref,\n  ...restProps\n}: PolymorphicCommonProps<T, TextButtonProps>) => {\n  return (\n    <ButtonBase\n      as={as}\n      buttonFill=\"text\"\n      variant={variant}\n      className={className}\n      isDisabled={isDisabled}\n      isLoading={isLoading}\n      onClick={onClick}\n      size={size}\n      style={style}\n      type={type}\n      htmlAttributes={htmlAttributes}\n      ref={ref}\n      {...restProps}\n    >\n      {children}\n    </ButtonBase>\n  );\n};\n"],"mappings":";;;;;;CAmCE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;;;;;;;;;;;;;;;;;;;;AAZF,MAAa,cAAsD,SAcjB;CAdiB,IAAA,EACjE,UACA,IACA,OAAO,UACP,YAAY,OACZ,UAAU,WACV,aAAa,OACb,OAAO,UACP,SACA,WACA,OACA,gBACA,QAAA,MACG,YAAA,yBAAA,MAAA,SAAA;CAEH,OACE,oBAAC,YAAA,eAAA,eAAA;EACK;EACJ,YAAW;EACF;EACE;EACC;EACD;EACF;EACH;EACC;EACD;EACU;EACX;CACD,GAAA,SAAA,GAAA,CAAA,GAAA,EAEH,SAAA,CACS,CAAA;AAEhB"}