mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Apply prettier over all files
This commit is contained in:
@@ -1,43 +1,43 @@
|
||||
import cn from "classnames";
|
||||
import React, { ButtonHTMLAttributes } from "react";
|
||||
import s from "./Button.module.css";
|
||||
import cn from 'classnames'
|
||||
import React, { ButtonHTMLAttributes } from 'react'
|
||||
import s from './Button.module.css'
|
||||
|
||||
interface Props extends ButtonHTMLAttributes<HTMLButtonElement> {
|
||||
href?: string;
|
||||
className?: string;
|
||||
variant?: "filled" | "outlined" | "flat" | "none";
|
||||
active?: boolean;
|
||||
type?: "submit" | "reset" | "button";
|
||||
href?: string
|
||||
className?: string
|
||||
variant?: 'filled' | 'outlined' | 'flat' | 'none'
|
||||
active?: boolean
|
||||
type?: 'submit' | 'reset' | 'button'
|
||||
}
|
||||
|
||||
export default class Button extends React.Component<Props> {
|
||||
public render() {
|
||||
const {
|
||||
className,
|
||||
variant = "filled",
|
||||
variant = 'filled',
|
||||
children,
|
||||
disabled = false,
|
||||
href,
|
||||
active,
|
||||
...rest
|
||||
} = this.props;
|
||||
} = this.props
|
||||
|
||||
let Component: React.ComponentType<
|
||||
React.AnchorHTMLAttributes<
|
||||
HTMLAnchorElement | HTMLButtonElement | HTMLDivElement
|
||||
> &
|
||||
React.ClassAttributes<HTMLButtonElement | HTMLAnchorElement>
|
||||
> = "a" as any;
|
||||
> = 'a' as any
|
||||
|
||||
// Catch for buttons / span / stc.
|
||||
|
||||
const rootClassName = cn(
|
||||
s.root,
|
||||
{
|
||||
[s.filled]: variant === "filled",
|
||||
[s.filled]: variant === 'filled',
|
||||
},
|
||||
className
|
||||
);
|
||||
)
|
||||
|
||||
return (
|
||||
<Component
|
||||
@@ -49,6 +49,6 @@ export default class Button extends React.Component<Props> {
|
||||
>
|
||||
{children}
|
||||
</Component>
|
||||
);
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@@ -1 +1 @@
|
||||
export { default } from "./Button";
|
||||
export { default } from './Button'
|
||||
|
Reference in New Issue
Block a user