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 @@
|
||||
import type { Meta, StoryObj } from '@storybook/nextjs-vite'
|
||||
import { LinkList } from './index'
|
||||
import { IconName } from '../Icons/iconName'
|
||||
import type { LinkListItemProps } from './LinkListItem'
|
||||
import type { Meta, StoryObj } from "@storybook/nextjs-vite"
|
||||
import { LinkList } from "./index"
|
||||
import { IconName } from "../Icons/iconName"
|
||||
import type { LinkListItemProps } from "./LinkListItem"
|
||||
|
||||
const meta: Meta<typeof LinkList> = {
|
||||
title: 'Core Components/LinkList/LinkList',
|
||||
title: "Core Components/LinkList/LinkList",
|
||||
component: LinkList,
|
||||
argTypes: {},
|
||||
}
|
||||
@@ -15,30 +15,30 @@ type Story = StoryObj<typeof LinkList>
|
||||
|
||||
const illustrationItems = [
|
||||
{
|
||||
text: 'First Link Item',
|
||||
text: "First Link Item",
|
||||
isExternal: false,
|
||||
illustration: {
|
||||
illustration: 'Granola' as IconName,
|
||||
size: 'medium',
|
||||
illustration: "Granola" as IconName,
|
||||
size: "medium",
|
||||
},
|
||||
} as LinkListItemProps,
|
||||
{
|
||||
text: 'Second Link Item',
|
||||
text: "Second Link Item",
|
||||
isExternal: true,
|
||||
illustration: {
|
||||
illustration: 'Coin' as IconName,
|
||||
size: 'small',
|
||||
illustration: "Coin" as IconName,
|
||||
size: "small",
|
||||
},
|
||||
} as LinkListItemProps,
|
||||
]
|
||||
|
||||
const textItems = [
|
||||
{
|
||||
text: 'First Link Item',
|
||||
text: "First Link Item",
|
||||
isExternal: false,
|
||||
} as LinkListItemProps,
|
||||
{
|
||||
text: 'Second Link Item',
|
||||
text: "Second Link Item",
|
||||
isExternal: true,
|
||||
} as LinkListItemProps,
|
||||
]
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { IconProps, LogoAndIllustrationProps } from '../../../Icons'
|
||||
import { IconName } from '../../../Icons/iconName'
|
||||
import { IllustrationByIconName } from '../../../Icons/IllustrationByIconName'
|
||||
import { FC } from 'react'
|
||||
import { IconProps, LogoAndIllustrationProps } from "../../../Icons"
|
||||
import { IconName } from "../../../Icons/iconName"
|
||||
import { IllustrationByIconName } from "../../../Icons/IllustrationByIconName"
|
||||
import { FC } from "react"
|
||||
|
||||
export interface IllustrationIconProps extends LogoAndIllustrationProps {
|
||||
illustration: IconName
|
||||
size?: 'small' | 'medium' | 'large'
|
||||
size?: "small" | "medium" | "large"
|
||||
}
|
||||
|
||||
function mapIllustrationToIcon(illustration: IconName): FC<IconProps> | null {
|
||||
@@ -21,7 +21,7 @@ const sizeMap = {
|
||||
|
||||
export function IllustrationIcon({
|
||||
illustration,
|
||||
size = 'large',
|
||||
size = "large",
|
||||
...props
|
||||
}: IllustrationIconProps) {
|
||||
const IllustrationComponent = mapIllustrationToIcon(illustration)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import type { Meta, StoryObj } from '@storybook/nextjs-vite'
|
||||
import { LinkListItem } from './index'
|
||||
import { IconName } from '../../Icons/iconName'
|
||||
import type { Meta, StoryObj } from "@storybook/nextjs-vite"
|
||||
import { LinkListItem } from "./index"
|
||||
import { IconName } from "../../Icons/iconName"
|
||||
|
||||
const meta: Meta<typeof LinkListItem> = {
|
||||
title: 'Core Components/LinkList/LinkListItem',
|
||||
title: "Core Components/LinkList/LinkListItem",
|
||||
component: LinkListItem,
|
||||
argTypes: {
|
||||
isExternal: {
|
||||
control: { type: 'boolean' },
|
||||
control: { type: "boolean" },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -18,24 +18,24 @@ type Story = StoryObj<typeof LinkListItem>
|
||||
|
||||
export const Default: Story = {
|
||||
args: {
|
||||
text: 'Link Item',
|
||||
text: "Link Item",
|
||||
},
|
||||
}
|
||||
|
||||
export const IllustrationItem: Story = {
|
||||
args: {
|
||||
text: 'Link Item',
|
||||
text: "Link Item",
|
||||
isExternal: false,
|
||||
illustration: {
|
||||
illustration: 'Granola' as IconName,
|
||||
size: 'medium',
|
||||
illustration: "Granola" as IconName,
|
||||
size: "medium",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
export const TextOnlyItem: Story = {
|
||||
args: {
|
||||
text: 'Link Item',
|
||||
text: "Link Item",
|
||||
isExternal: true,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { MaterialIcon } from '../../Icons/MaterialIcon'
|
||||
import { Typography } from '../../Typography'
|
||||
import { MaterialIcon } from "../../Icons/MaterialIcon"
|
||||
import { Typography } from "../../Typography"
|
||||
|
||||
import styles from './linkListItem.module.css'
|
||||
import styles from "./linkListItem.module.css"
|
||||
import {
|
||||
IllustrationIcon,
|
||||
IllustrationIconProps,
|
||||
} from '../LinkListItem/IllustrationIcon'
|
||||
} from "../LinkListItem/IllustrationIcon"
|
||||
|
||||
import { cx } from 'class-variance-authority'
|
||||
import { Link } from 'react-aria-components'
|
||||
import { cx } from "class-variance-authority"
|
||||
import { Link } from "react-aria-components"
|
||||
|
||||
export interface LinkListItemProps {
|
||||
text: string
|
||||
@@ -50,7 +50,7 @@ export function LinkListItem({
|
||||
</Typography>
|
||||
<MaterialIcon
|
||||
color="Icon/Interactive/Default"
|
||||
icon={isExternal ? 'open_in_new' : 'arrow_forward'}
|
||||
icon={isExternal ? "open_in_new" : "arrow_forward"}
|
||||
/>
|
||||
</Link>
|
||||
)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { LinkListItem, type LinkListItemProps } from './LinkListItem'
|
||||
import styles from './LinkListItem/linkListItem.module.css'
|
||||
import { LinkListItem, type LinkListItemProps } from "./LinkListItem"
|
||||
import styles from "./LinkListItem/linkListItem.module.css"
|
||||
export interface LinkListProps {
|
||||
linkListItems: LinkListItemProps[]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user