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,10 @@
|
||||
'use client'
|
||||
"use client"
|
||||
|
||||
import { useMemo } from 'react'
|
||||
import { useMemo } from "react"
|
||||
|
||||
import styles from './scrollWrapper.module.css'
|
||||
import styles from "./scrollWrapper.module.css"
|
||||
|
||||
import useScrollShadows from '@scandic-hotels/common/hooks/useScrollShadows'
|
||||
import useScrollShadows from "@scandic-hotels/common/hooks/useScrollShadows"
|
||||
|
||||
export default function ScrollWrapper({
|
||||
className,
|
||||
@@ -21,7 +21,7 @@ export default function ScrollWrapper({
|
||||
if (showRightShadow) {
|
||||
cls.push(styles.rightShadow)
|
||||
}
|
||||
return cls.join(' ')
|
||||
return cls.join(" ")
|
||||
}, [showLeftShadow, showRightShadow, className])
|
||||
|
||||
return (
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
.scrollWrapper::before,
|
||||
.scrollWrapper::after {
|
||||
content: '';
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import styles from './table.module.css'
|
||||
import styles from "./table.module.css"
|
||||
|
||||
function TBody({ children }: React.PropsWithChildren) {
|
||||
return <tbody className={styles.tbody}>{children}</tbody>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import styles from './table.module.css'
|
||||
import styles from "./table.module.css"
|
||||
|
||||
function TD({
|
||||
children,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import styles from './table.module.css'
|
||||
import styles from "./table.module.css"
|
||||
|
||||
import type { THeadProps } from './table'
|
||||
import type { THeadProps } from "./table"
|
||||
|
||||
function TH({ children, width = 'auto', ...props }: THeadProps) {
|
||||
function TH({ children, width = "auto", ...props }: THeadProps) {
|
||||
return (
|
||||
<th className={styles.th} style={{ width }} {...props}>
|
||||
{children}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import styles from './table.module.css'
|
||||
import styles from "./table.module.css"
|
||||
|
||||
function THead({ children }: React.PropsWithChildren) {
|
||||
return <thead className={styles.thead}>{children}</thead>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import styles from './table.module.css'
|
||||
import styles from "./table.module.css"
|
||||
|
||||
function TR({
|
||||
children,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import TBody from './TBody'
|
||||
import TD from './TD'
|
||||
import TH from './TH'
|
||||
import THead from './THead'
|
||||
import TR from './TR'
|
||||
import { tableVariants } from './variants'
|
||||
import TBody from "./TBody"
|
||||
import TD from "./TD"
|
||||
import TH from "./TH"
|
||||
import THead from "./THead"
|
||||
import TR from "./TR"
|
||||
import { tableVariants } from "./variants"
|
||||
|
||||
import type { TableProps } from './table'
|
||||
import ScrollWrapper from './ScrollWrapper'
|
||||
import type { TableProps } from "./table"
|
||||
import ScrollWrapper from "./ScrollWrapper"
|
||||
|
||||
function Table({
|
||||
className,
|
||||
@@ -14,7 +14,7 @@ function Table({
|
||||
borderRadius,
|
||||
variant,
|
||||
layout,
|
||||
width = '100%',
|
||||
width = "100%",
|
||||
children,
|
||||
...props
|
||||
}: TableProps) {
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
import type { VariantProps } from 'class-variance-authority'
|
||||
import type { VariantProps } from "class-variance-authority"
|
||||
|
||||
import type { tableVariants } from './variants'
|
||||
import type { tableVariants } from "./variants"
|
||||
|
||||
export interface TableProps
|
||||
extends React.PropsWithChildren<React.HTMLAttributes<HTMLTableElement>>,
|
||||
extends
|
||||
React.PropsWithChildren<React.HTMLAttributes<HTMLTableElement>>,
|
||||
VariantProps<typeof tableVariants> {
|
||||
width?: string
|
||||
}
|
||||
|
||||
export interface THeadProps
|
||||
extends React.PropsWithChildren<React.HTMLAttributes<HTMLTableCellElement>> {
|
||||
export interface THeadProps extends React.PropsWithChildren<
|
||||
React.HTMLAttributes<HTMLTableCellElement>
|
||||
> {
|
||||
width?: string
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { cva } from 'class-variance-authority'
|
||||
import { cva } from "class-variance-authority"
|
||||
|
||||
import styles from './table.module.css'
|
||||
import styles from "./table.module.css"
|
||||
|
||||
export const tableVariants = cva(styles.table, {
|
||||
variants: {
|
||||
@@ -12,7 +12,7 @@ export const tableVariants = cva(styles.table, {
|
||||
content: styles.content,
|
||||
},
|
||||
borderRadius: {
|
||||
none: '',
|
||||
none: "",
|
||||
small: styles.smallRadius,
|
||||
medium: styles.mediumRadius,
|
||||
large: styles.largeRadius,
|
||||
@@ -22,6 +22,6 @@ export const tableVariants = cva(styles.table, {
|
||||
},
|
||||
},
|
||||
defaultVariants: {
|
||||
borderRadius: 'medium',
|
||||
borderRadius: "medium",
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user