File size: 467 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import * as React from "react"
import { CloseIcon } from "../icons"
import { IconButton, type IconButtonProps } from "./icon-button"

export interface CloseButtonProps extends IconButtonProps {}

export const CloseButton = React.forwardRef<
  HTMLButtonElement,
  CloseButtonProps
>(function CloseButton(props, ref) {
  return (
    <IconButton variant="ghost" aria-label="Close" ref={ref} {...props}>
      {props.children ?? <CloseIcon />}
    </IconButton>
  )
})