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,10 +1,11 @@
|
||||
import { Slot } from '@radix-ui/react-slot'
|
||||
import { Slot } from "@radix-ui/react-slot"
|
||||
|
||||
import { captionVariants, fontOnlycaptionVariants } from './variants'
|
||||
import { VariantProps } from 'class-variance-authority'
|
||||
import { captionVariants, fontOnlycaptionVariants } from "./variants"
|
||||
import { VariantProps } from "class-variance-authority"
|
||||
|
||||
interface CaptionProps
|
||||
extends Omit<React.HTMLAttributes<HTMLHeadingElement>, 'color'>,
|
||||
extends
|
||||
Omit<React.HTMLAttributes<HTMLHeadingElement>, "color">,
|
||||
VariantProps<typeof captionVariants> {
|
||||
asChild?: boolean
|
||||
fontOnly?: boolean
|
||||
@@ -15,7 +16,7 @@ interface CaptionProps
|
||||
*/
|
||||
export default function Caption({
|
||||
asChild = false,
|
||||
className = '',
|
||||
className = "",
|
||||
color,
|
||||
fontOnly = false,
|
||||
textAlign,
|
||||
@@ -25,7 +26,7 @@ export default function Caption({
|
||||
type,
|
||||
...props
|
||||
}: CaptionProps) {
|
||||
const Comp = asChild ? Slot : 'p'
|
||||
const Comp = asChild ? Slot : "p"
|
||||
const classNames = fontOnly
|
||||
? fontOnlycaptionVariants({
|
||||
className,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { cva } from 'class-variance-authority'
|
||||
import { cva } from "class-variance-authority"
|
||||
|
||||
import styles from './caption.module.css'
|
||||
import styles from "./caption.module.css"
|
||||
|
||||
const config = {
|
||||
variants: {
|
||||
@@ -44,8 +44,8 @@ const config = {
|
||||
},
|
||||
},
|
||||
defaultVariants: {
|
||||
color: 'black',
|
||||
type: 'regular',
|
||||
color: "black",
|
||||
type: "regular",
|
||||
},
|
||||
} as const
|
||||
|
||||
@@ -70,7 +70,7 @@ const fontOnlyConfig = {
|
||||
},
|
||||
},
|
||||
defaultVariants: {
|
||||
type: 'regular',
|
||||
type: "regular",
|
||||
},
|
||||
} as const
|
||||
|
||||
|
||||
Reference in New Issue
Block a user