mirror of
https://github.com/tailscale/tailscale.git
synced 2025-03-28 12:02:23 +00:00

Enforcing inclusion of our OSS license at the top of .ts and .tsx files. Also updates any relevant files in the repo that were previously missing the license comment. An additional `@license` comment is added to client/web/src/index.tsx to preserve the license in generated Javascript. Updates #10261 Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
33 lines
652 B
TypeScript
33 lines
652 B
TypeScript
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
import cx from "classnames"
|
|
import React, { HTMLAttributes } from "react"
|
|
|
|
type Props = {
|
|
className?: string
|
|
size: "sm" | "md"
|
|
} & HTMLAttributes<HTMLDivElement>
|
|
|
|
export default function Spinner(props: Props) {
|
|
const { className, size, ...rest } = props
|
|
|
|
return (
|
|
<div
|
|
className={cx(
|
|
"spinner inline-block rounded-full align-middle",
|
|
{
|
|
"border-2 w-4 h-4": size === "sm",
|
|
"border-4 w-8 h-8": size === "md",
|
|
},
|
|
className
|
|
)}
|
|
{...rest}
|
|
/>
|
|
)
|
|
}
|
|
|
|
Spinner.defaultProps = {
|
|
size: "md",
|
|
}
|