Skip to content

Commit

Permalink
day 53
Browse files Browse the repository at this point in the history
  • Loading branch information
famovkin committed Dec 18, 2023
1 parent 356e9ba commit 84113c6
Show file tree
Hide file tree
Showing 9 changed files with 155 additions and 67 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.fttemplates
1 change: 1 addition & 0 deletions .fttemplates/Component/[FTName].module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.[FTName] {}
24 changes: 24 additions & 0 deletions .fttemplates/Component/[FTName].stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import type { Meta, StoryObj } from '@storybook/react';
import { Theme } from 'app/providers/ThemeProvider';
import { StoreDecorator } from 'shared/config/storybook/StoreDecorator/StoreDecorator';
import { ThemeDecorator } from 'shared/config/storybook/ThemeDecorator/ThemeDecorator';
import { Theme } from 'app/providers/ThemeProvider';
import { [FTName] } from './[FTName]';

const meta: Meta<typeof [FTName]> = {
title: 'category/[FTName]',
component: [FTName],
args: {},
};

export default meta;
type Story = StoryObj<typeof [FTName]>;

export const Primary: Story = {
args: {},
};

export const Dark: Story = {
args: {},
};
Dark.decorators = [ThemeDecorator(Theme.DARK)];
19 changes: 19 additions & 0 deletions .fttemplates/Component/[FTName].tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { classNames } from 'shared/lib/classNames/classNames';
import { useTranslation } from 'react-i18next';

import cls from './[FTName].module.scss';

interface [FTName]Props {
className?: string;
}

export const [FTName] = (props: ButtonProps) => {
const { className } = props;
const { t } = useTranslation();

return (
<div className={classNames(cls.[FTName], {}, [className])}>

</div>
);
};
1 change: 1 addition & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.fttemplates
10 changes: 5 additions & 5 deletions config/jest/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ export default {
__PROJECT__: 'jest',
},

// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
testPathIgnorePatterns: [
'.fttemplates/**',
],

// All imported modules in your tests should be mocked automatically
// automock: false,

Expand Down Expand Up @@ -153,11 +158,6 @@ export default {
// Adds a location field to test results
// testLocationInResults: false,

// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
// testPathIgnorePatterns: [
// "/node_modules/"
// ],

// The regexp pattern or array of patterns that Jest uses to detect test files
// testRegex: [],

Expand Down
Loading

0 comments on commit 84113c6

Please sign in to comment.