github.com/tilt-dev/tilt@v0.33.15-0.20240515162809-0a22ed45d8a0/web/src/ButtonLink.tsx (about)

     1  import React from "react"
     2  import styled from "styled-components"
     3  import { ButtonMixin } from "./ButtonMixin"
     4  
     5  let ButtonLinkRoot = styled.a`
     6    ${ButtonMixin}
     7  `
     8  
     9  type ButtonLinkProps = {
    10    children: any
    11    href: string
    12    target?: string
    13    rel?: string
    14  }
    15  
    16  function ButtonLink(props: ButtonLinkProps) {
    17    return (
    18      <ButtonLinkRoot
    19        href={props.href}
    20        {...(props.target ? { target: props.target } : {})}
    21        {...(props.rel ? { rel: props.rel } : {})}
    22      >
    23        {props.children}
    24      </ButtonLinkRoot>
    25    )
    26  }
    27  
    28  export default ButtonLink