mirror of
https://github.com/ershisan99/flashcards-example-project.git
synced 2025-12-16 20:59:27 +00:00
chore: lint with tabwidth: 2
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
...require('@it-incubator/prettier-config'),
|
...require('@it-incubator/prettier-config'),
|
||||||
tabWidth: 4,
|
|
||||||
//override settings here
|
|
||||||
}
|
}
|
||||||
@@ -11,9 +11,7 @@ const SvgComponent = (props: SVGProps<SVGSVGElement>, ref: Ref<SVGSVGElement>) =
|
|||||||
>
|
>
|
||||||
<g clipPath={'url(#clip0_5928_3055)'}>
|
<g clipPath={'url(#clip0_5928_3055)'}>
|
||||||
<path
|
<path
|
||||||
d={
|
d={'M10.2733 11.06L7.21998 8L10.2733 4.94L9.33331 4L5.33331 8L9.33331 12L10.2733 11.06Z'}
|
||||||
'M10.2733 11.06L7.21998 8L10.2733 4.94L9.33331 4L5.33331 8L9.33331 12L10.2733 11.06Z'
|
|
||||||
}
|
|
||||||
fill={'white'}
|
fill={'white'}
|
||||||
/>
|
/>
|
||||||
</g>
|
</g>
|
||||||
|
|||||||
@@ -11,9 +11,7 @@ const SvgComponent = (props: SVGProps<SVGSVGElement>, ref: Ref<SVGSVGElement>) =
|
|||||||
>
|
>
|
||||||
<g clipPath={'url(#clip0_5928_3027)'}>
|
<g clipPath={'url(#clip0_5928_3027)'}>
|
||||||
<path
|
<path
|
||||||
d={
|
d={'M5.72665 11.06L8.77999 8L5.72665 4.94L6.66665 4L10.6667 8L6.66665 12L5.72665 11.06Z'}
|
||||||
'M5.72665 11.06L8.77999 8L5.72665 4.94L6.66665 4L10.6667 8L6.66665 12L5.72665 11.06Z'
|
|
||||||
}
|
|
||||||
fill={'white'}
|
fill={'white'}
|
||||||
/>
|
/>
|
||||||
</g>
|
</g>
|
||||||
|
|||||||
@@ -1,21 +1,23 @@
|
|||||||
import { SVGProps, Ref, forwardRef, memo } from "react"
|
import { Ref, SVGProps, forwardRef, memo } from 'react'
|
||||||
const SvgComponent = (
|
const SvgComponent = (props: SVGProps<SVGSVGElement>, ref: Ref<SVGSVGElement>) => (
|
||||||
props: SVGProps<SVGSVGElement>,
|
|
||||||
ref: Ref<SVGSVGElement>
|
|
||||||
) => (
|
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
fill={'none'}
|
||||||
width={24}
|
|
||||||
height={24}
|
height={24}
|
||||||
fill="none"
|
|
||||||
ref={ref}
|
ref={ref}
|
||||||
|
width={24}
|
||||||
|
xmlns={'http://www.w3.org/2000/svg'}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
<g fill="#000" clipPath="url(#a)">
|
<g clipPath={'url(#a)'} fill={'#000'}>
|
||||||
<path d="M7 6a1 1 0 0 0 0-2H5a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h2a1 1 0 0 0 0-2H6V6h1Zm13.82 5.42-2.82-4a1 1 0 1 0-1.63 1.16L18.09 11H10a1 1 0 0 0 0 2h8l-1.8 2.4a1 1 0 0 0 1.6 1.2l3-4a1 1 0 0 0 .02-1.18Z" />
|
<path
|
||||||
|
d={
|
||||||
|
'M7 6a1 1 0 0 0 0-2H5a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h2a1 1 0 0 0 0-2H6V6h1Zm13.82 5.42-2.82-4a1 1 0 1 0-1.63 1.16L18.09 11H10a1 1 0 0 0 0 2h8l-1.8 2.4a1 1 0 0 0 1.6 1.2l3-4a1 1 0 0 0 .02-1.18Z'
|
||||||
|
}
|
||||||
|
/>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
)
|
)
|
||||||
const ForwardRef = forwardRef(SvgComponent)
|
const ForwardRef = forwardRef(SvgComponent)
|
||||||
const Memo = memo(ForwardRef)
|
const Memo = memo(ForwardRef)
|
||||||
|
|
||||||
export default Memo
|
export default Memo
|
||||||
|
|||||||
@@ -38,11 +38,7 @@ export const RecoverPassword = (props: Props) => {
|
|||||||
</Typography>
|
</Typography>
|
||||||
<form onSubmit={handleFormSubmitted}>
|
<form onSubmit={handleFormSubmitted}>
|
||||||
<div className={s.form}>
|
<div className={s.form}>
|
||||||
<ControlledTextField
|
<ControlledTextField control={control} name={'email'} placeholder={'Email'} />
|
||||||
control={control}
|
|
||||||
name={'email'}
|
|
||||||
placeholder={'Email'}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<Typography className={s.instructions} variant={'body2'}>
|
<Typography className={s.instructions} variant={'body2'}>
|
||||||
Enter your email address and we will send you further instructions
|
Enter your email address and we will send you further instructions
|
||||||
|
|||||||
@@ -38,12 +38,7 @@ export const DeckDialog = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog
|
<Dialog {...dialogProps} onCancel={handleCancel} onConfirm={onSubmit} title={'Create new deck'}>
|
||||||
{...dialogProps}
|
|
||||||
onCancel={handleCancel}
|
|
||||||
onConfirm={onSubmit}
|
|
||||||
title={'Create new deck'}
|
|
||||||
>
|
|
||||||
<form className={s.content} onSubmit={onSubmit}>
|
<form className={s.content} onSubmit={onSubmit}>
|
||||||
<ControlledTextField control={control} label={'Deck name'} name={'name'} />
|
<ControlledTextField control={control} label={'Deck name'} name={'name'} />
|
||||||
<ControlledCheckbox
|
<ControlledCheckbox
|
||||||
|
|||||||
@@ -72,10 +72,7 @@ export const DecksTable = ({ currentUserId, decks, onDeleteClick, onEditClick }:
|
|||||||
<Button onClick={handleEditClick(deck.id)} variant={'icon'}>
|
<Button onClick={handleEditClick(deck.id)} variant={'icon'}>
|
||||||
<Edit2Outline />
|
<Edit2Outline />
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button onClick={handleDeleteClick(deck.id)} variant={'icon'}>
|
||||||
onClick={handleDeleteClick(deck.id)}
|
|
||||||
variant={'icon'}
|
|
||||||
>
|
|
||||||
<TrashOutline />
|
<TrashOutline />
|
||||||
</Button>
|
</Button>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import type { Meta, StoryObj } from '@storybook/react'
|
import type { Meta, StoryObj } from '@storybook/react'
|
||||||
|
|
||||||
import { Button } from './'
|
import { Button } from './'
|
||||||
import {Camera} from "@/assets";
|
import { Camera } from '@/assets'
|
||||||
|
|
||||||
const meta = {
|
const meta = {
|
||||||
argTypes: {
|
argTypes: {
|
||||||
@@ -20,7 +20,11 @@ type Story = StoryObj<typeof meta>
|
|||||||
|
|
||||||
export const Primary: Story = {
|
export const Primary: Story = {
|
||||||
args: {
|
args: {
|
||||||
children: <>Turn Camera On <Camera/></>,
|
children: (
|
||||||
|
<>
|
||||||
|
Turn Camera On <Camera />
|
||||||
|
</>
|
||||||
|
),
|
||||||
disabled: false,
|
disabled: false,
|
||||||
variant: 'primary',
|
variant: 'primary',
|
||||||
},
|
},
|
||||||
@@ -61,7 +65,7 @@ export const AsLink: Story = {
|
|||||||
args: {
|
args: {
|
||||||
as: 'button',
|
as: 'button',
|
||||||
children: 'Link that looks like a button',
|
children: 'Link that looks like a button',
|
||||||
variant: 'primary',
|
|
||||||
href: 'https://google.com',
|
href: 'https://google.com',
|
||||||
|
variant: 'primary',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,9 +14,6 @@ export const Button = <T extends ElementType = 'button'>(props: ButtonProps<T>)
|
|||||||
const { as: Component = 'button', className, fullWidth, variant = 'primary', ...rest } = props
|
const { as: Component = 'button', className, fullWidth, variant = 'primary', ...rest } = props
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Component
|
<Component className={`${s[variant]} ${fullWidth ? s.fullWidth : ''} ${className}`} {...rest} />
|
||||||
className={`${s[variant]} ${fullWidth ? s.fullWidth : ''} ${className}`}
|
|
||||||
{...rest}
|
|
||||||
/>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,10 +51,7 @@ export const Checkbox: FC<CheckboxProps> = ({
|
|||||||
required={required}
|
required={required}
|
||||||
>
|
>
|
||||||
{checked && (
|
{checked && (
|
||||||
<CheckboxRadix.Indicator
|
<CheckboxRadix.Indicator className={classNames.indicator} forceMount>
|
||||||
className={classNames.indicator}
|
|
||||||
forceMount
|
|
||||||
>
|
|
||||||
<Check />
|
<Check />
|
||||||
</CheckboxRadix.Indicator>
|
</CheckboxRadix.Indicator>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -153,14 +153,7 @@ const MainPaginationButtons: FC<MainPaginationButtonsProps> = ({
|
|||||||
return <Dots key={index} />
|
return <Dots key={index} />
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return <PageButton key={index} onClick={onClick(page)} page={page} selected={isSelected} />
|
||||||
<PageButton
|
|
||||||
key={index}
|
|
||||||
onClick={onClick(page)}
|
|
||||||
page={page}
|
|
||||||
selected={isSelected}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
})}
|
})}
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -25,9 +25,9 @@ export const Default = {
|
|||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell>Web Basic</TableCell>
|
<TableCell>Web Basic</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
|
||||||
tempor incididunt ut sed do eiusmod tempoei usmodr sit amet, consectetur
|
incididunt ut sed do eiusmod tempoei usmodr sit amet, consectetur adipiscing elit, sed
|
||||||
adipiscing elit, sed do...
|
do...
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
<Typography
|
<Typography
|
||||||
@@ -36,8 +36,8 @@ export const Default = {
|
|||||||
target={'_blank'}
|
target={'_blank'}
|
||||||
variant={'link1'}
|
variant={'link1'}
|
||||||
>
|
>
|
||||||
Какая-то ссылка кудато на какой-то источник с информациейо ссылка
|
Какая-то ссылка кудато на какой-то источник с информациейо ссылка кудато на какой-то
|
||||||
кудато на какой-то источник
|
источник
|
||||||
</Typography>
|
</Typography>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>Основной</TableCell>
|
<TableCell>Основной</TableCell>
|
||||||
@@ -47,13 +47,13 @@ export const Default = {
|
|||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell>Web Basic</TableCell>
|
<TableCell>Web Basic</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
|
||||||
tempor incididunt ut sed do eiusmod tempoei usmodr sit amet, consectetur
|
incididunt ut sed do eiusmod tempoei usmodr sit amet, consectetur adipiscing elit, sed
|
||||||
adipiscing elit, sed do...
|
do...
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
Какая-то ссылка кудато на какой-то источник с информациейо ссылка кудато
|
Какая-то ссылка кудато на какой-то источник с информациейо ссылка кудато на какой-то
|
||||||
на какой-то источник
|
источник
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>Основной</TableCell>
|
<TableCell>Основной</TableCell>
|
||||||
<TableCell>Читать</TableCell>
|
<TableCell>Читать</TableCell>
|
||||||
@@ -68,8 +68,7 @@ export const Default = {
|
|||||||
const data = [
|
const data = [
|
||||||
{
|
{
|
||||||
category: 'Основной',
|
category: 'Основной',
|
||||||
description:
|
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor',
|
||||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor',
|
|
||||||
id: '01',
|
id: '01',
|
||||||
link: 'Какая-то ссылка кудато на какой-то источник с информациейо ссылка кудато на какой-то',
|
link: 'Какая-то ссылка кудато на какой-то источник с информациейо ссылка кудато на какой-то',
|
||||||
title: 'Web Basic',
|
title: 'Web Basic',
|
||||||
@@ -77,8 +76,7 @@ const data = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
category: 'Основной',
|
category: 'Основной',
|
||||||
description:
|
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor',
|
||||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor',
|
|
||||||
id: '02',
|
id: '02',
|
||||||
link: 'Какая-то ссылка куда-то',
|
link: 'Какая-то ссылка куда-то',
|
||||||
title: 'Web Basic',
|
title: 'Web Basic',
|
||||||
@@ -86,8 +84,7 @@ const data = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
category: 'Основной',
|
category: 'Основной',
|
||||||
description:
|
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor',
|
||||||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor',
|
|
||||||
id: '03',
|
id: '03',
|
||||||
link: 'Какая-то ссылка кудато на какой-то источник с информациейо ссылка кудато на какой-то. Какая-то ссылка кудато на какой-то источник с информациейо ссылка куда-то на какой-то',
|
link: 'Какая-то ссылка кудато на какой-то источник с информациейо ссылка кудато на какой-то. Какая-то ссылка кудато на какой-то источник с информациейо ссылка куда-то на какой-то',
|
||||||
title: 'Web Basic',
|
title: 'Web Basic',
|
||||||
|
|||||||
@@ -119,9 +119,7 @@ export const TableHeader: FC<
|
|||||||
{columns.map(({ key, sortable = true, title }) => (
|
{columns.map(({ key, sortable = true, title }) => (
|
||||||
<TableHeadCell key={key} onClick={handleSort(key, sortable)}>
|
<TableHeadCell key={key} onClick={handleSort(key, sortable)}>
|
||||||
{title}
|
{title}
|
||||||
{sort && sort.key === key && (
|
{sort && sort.key === key && <span>{sort.direction === 'asc' ? '▲' : '▼'}</span>}
|
||||||
<span>{sort.direction === 'asc' ? '▲' : '▼'}</span>
|
|
||||||
)}
|
|
||||||
</TableHeadCell>
|
</TableHeadCell>
|
||||||
))}
|
))}
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
|
|
||||||
import { Button, Page, Slider, TextField, Typography } from '@/components'
|
import { Button, DecksTable, Page, Slider, TextField, Typography } from '@/components'
|
||||||
import { DecksTable } from '@/components'
|
|
||||||
import { DeckDialog } from '@/components/decks/deck-dialog'
|
import { DeckDialog } from '@/components/decks/deck-dialog'
|
||||||
import { DeleteDeckDialog } from '@/components/decks/delete-deck-dialog'
|
import { DeleteDeckDialog } from '@/components/decks/delete-deck-dialog'
|
||||||
import { Pagination } from '@/components/ui/pagination'
|
import { Pagination } from '@/components/ui/pagination'
|
||||||
@@ -117,12 +116,7 @@ export const DecksPage = () => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className={s.filters}>
|
<div className={s.filters}>
|
||||||
<TextField
|
<TextField onValueChange={setSearch} placeholder={'Search'} search value={search} />
|
||||||
onValueChange={setSearch}
|
|
||||||
placeholder={'Search'}
|
|
||||||
search
|
|
||||||
value={search}
|
|
||||||
/>
|
|
||||||
<Tabs onValueChange={value => setCurrentTab(value as Tab)} value={currentTab}>
|
<Tabs onValueChange={value => setCurrentTab(value as Tab)} value={currentTab}>
|
||||||
<TabsList>
|
<TabsList>
|
||||||
<TabsTrigger value={'my'}>My decks</TabsTrigger>
|
<TabsTrigger value={'my'}>My decks</TabsTrigger>
|
||||||
|
|||||||
Reference in New Issue
Block a user