Merged in fix/3697-prettier-configs (pull request #3396)
fix(SW-3691): Setup one prettier config for whole repo * Setup prettierrc in root and remove other configs Approved-by: Joakim Jäderberg Approved-by: Linus Flood
This commit is contained in:
@@ -1,23 +1,25 @@
|
||||
'use client'
|
||||
"use client"
|
||||
|
||||
import { Slot } from '@radix-ui/react-slot'
|
||||
import { Button as ButtonRAC } from 'react-aria-components'
|
||||
import { Slot } from "@radix-ui/react-slot"
|
||||
import { Button as ButtonRAC } from "react-aria-components"
|
||||
|
||||
import { buttonVariants } from './variants'
|
||||
import { buttonVariants } from "./variants"
|
||||
|
||||
import type { VariantProps } from 'class-variance-authority'
|
||||
import type { ButtonProps as ReactAriaButtonProps } from 'react-aria-components'
|
||||
import type { VariantProps } from "class-variance-authority"
|
||||
import type { ButtonProps as ReactAriaButtonProps } from "react-aria-components"
|
||||
|
||||
export interface ButtonPropsRAC
|
||||
extends Omit<ReactAriaButtonProps, 'isDisabled' | 'onClick'>,
|
||||
extends
|
||||
Omit<ReactAriaButtonProps, "isDisabled" | "onClick">,
|
||||
VariantProps<typeof buttonVariants> {
|
||||
asChild?: false | undefined | never
|
||||
disabled?: ReactAriaButtonProps['isDisabled']
|
||||
onClick?: ReactAriaButtonProps['onPress']
|
||||
disabled?: ReactAriaButtonProps["isDisabled"]
|
||||
onClick?: ReactAriaButtonProps["onPress"]
|
||||
}
|
||||
|
||||
export interface ButtonPropsSlot
|
||||
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
||||
extends
|
||||
React.ButtonHTMLAttributes<HTMLButtonElement>,
|
||||
VariantProps<typeof buttonVariants> {
|
||||
asChild: true
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { cva } from 'class-variance-authority'
|
||||
import { cva } from "class-variance-authority"
|
||||
|
||||
import styles from './button.module.css'
|
||||
import styles from "./button.module.css"
|
||||
|
||||
export const buttonVariants = cva(styles.btn, {
|
||||
variants: {
|
||||
@@ -18,14 +18,14 @@ export const buttonVariants = cva(styles.btn, {
|
||||
large: styles.large,
|
||||
},
|
||||
theme: {
|
||||
base: '',
|
||||
primaryDark: '',
|
||||
primaryStrong: '',
|
||||
primaryLight: '',
|
||||
secondaryLight: '',
|
||||
secondaryDark: '',
|
||||
tertiaryLight: '',
|
||||
tertiaryDark: '',
|
||||
base: "",
|
||||
primaryDark: "",
|
||||
primaryStrong: "",
|
||||
primaryLight: "",
|
||||
secondaryLight: "",
|
||||
secondaryDark: "",
|
||||
tertiaryLight: "",
|
||||
tertiaryDark: "",
|
||||
},
|
||||
variant: {
|
||||
clean: styles.clean,
|
||||
@@ -43,112 +43,112 @@ export const buttonVariants = cva(styles.btn, {
|
||||
},
|
||||
},
|
||||
defaultVariants: {
|
||||
intent: 'primary',
|
||||
size: 'medium',
|
||||
theme: 'primaryLight',
|
||||
variant: 'default',
|
||||
intent: "primary",
|
||||
size: "medium",
|
||||
theme: "primaryLight",
|
||||
variant: "default",
|
||||
},
|
||||
|
||||
compoundVariants: [
|
||||
{
|
||||
className: styles.basePrimary,
|
||||
intent: 'primary',
|
||||
theme: 'base',
|
||||
intent: "primary",
|
||||
theme: "base",
|
||||
},
|
||||
{
|
||||
className: styles.baseSecondary,
|
||||
intent: 'secondary',
|
||||
theme: 'base',
|
||||
intent: "secondary",
|
||||
theme: "base",
|
||||
},
|
||||
{
|
||||
className: styles.baseTertiary,
|
||||
intent: 'tertiary',
|
||||
theme: 'base',
|
||||
intent: "tertiary",
|
||||
theme: "base",
|
||||
},
|
||||
{
|
||||
className: styles.baseInverted,
|
||||
intent: 'inverted',
|
||||
theme: 'base',
|
||||
intent: "inverted",
|
||||
theme: "base",
|
||||
},
|
||||
{
|
||||
className: styles.primaryDarkPrimary,
|
||||
intent: 'primary',
|
||||
theme: 'primaryDark',
|
||||
intent: "primary",
|
||||
theme: "primaryDark",
|
||||
},
|
||||
{
|
||||
className: styles.primaryDarkSecondary,
|
||||
intent: 'secondary',
|
||||
theme: 'primaryDark',
|
||||
intent: "secondary",
|
||||
theme: "primaryDark",
|
||||
},
|
||||
{
|
||||
className: styles.primaryLightPrimary,
|
||||
intent: 'primary',
|
||||
theme: 'primaryLight',
|
||||
intent: "primary",
|
||||
theme: "primaryLight",
|
||||
},
|
||||
{
|
||||
className: styles.primaryLightSecondary,
|
||||
intent: 'secondary',
|
||||
theme: 'primaryLight',
|
||||
intent: "secondary",
|
||||
theme: "primaryLight",
|
||||
},
|
||||
{
|
||||
className: styles.primaryStrongPrimary,
|
||||
intent: 'primary',
|
||||
theme: 'primaryStrong',
|
||||
intent: "primary",
|
||||
theme: "primaryStrong",
|
||||
},
|
||||
{
|
||||
className: styles.primaryStrongSecondary,
|
||||
intent: 'secondary',
|
||||
theme: 'primaryStrong',
|
||||
intent: "secondary",
|
||||
theme: "primaryStrong",
|
||||
},
|
||||
{
|
||||
className: styles.secondaryDarkPrimary,
|
||||
intent: 'primary',
|
||||
theme: 'secondaryDark',
|
||||
intent: "primary",
|
||||
theme: "secondaryDark",
|
||||
},
|
||||
{
|
||||
className: styles.secondaryDarkSecondary,
|
||||
intent: 'secondary',
|
||||
theme: 'secondaryDark',
|
||||
intent: "secondary",
|
||||
theme: "secondaryDark",
|
||||
},
|
||||
{
|
||||
className: styles.secondaryLightPrimary,
|
||||
intent: 'primary',
|
||||
theme: 'secondaryLight',
|
||||
intent: "primary",
|
||||
theme: "secondaryLight",
|
||||
},
|
||||
{
|
||||
className: styles.secondaryLightSecondary,
|
||||
intent: 'secondary',
|
||||
theme: 'secondaryLight',
|
||||
intent: "secondary",
|
||||
theme: "secondaryLight",
|
||||
},
|
||||
{
|
||||
className: styles.tertiaryDarkPrimary,
|
||||
intent: 'primary',
|
||||
theme: 'tertiaryDark',
|
||||
intent: "primary",
|
||||
theme: "tertiaryDark",
|
||||
},
|
||||
{
|
||||
className: styles.tertiaryDarkSecondary,
|
||||
intent: 'secondary',
|
||||
theme: 'tertiaryDark',
|
||||
intent: "secondary",
|
||||
theme: "tertiaryDark",
|
||||
},
|
||||
{
|
||||
className: styles.tertiaryLightPrimary,
|
||||
intent: 'primary',
|
||||
theme: 'tertiaryLight',
|
||||
intent: "primary",
|
||||
theme: "tertiaryLight",
|
||||
},
|
||||
{
|
||||
className: styles.tertiaryLightSecondary,
|
||||
intent: 'secondary',
|
||||
theme: 'tertiaryLight',
|
||||
intent: "secondary",
|
||||
theme: "tertiaryLight",
|
||||
},
|
||||
{
|
||||
className: styles.baseText,
|
||||
intent: 'text',
|
||||
theme: 'base',
|
||||
intent: "text",
|
||||
theme: "base",
|
||||
},
|
||||
{
|
||||
className: styles.baseTextInverted,
|
||||
intent: 'textInverted',
|
||||
theme: 'base',
|
||||
intent: "textInverted",
|
||||
theme: "base",
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user