Skip to content

Commit 2775a7f

Browse files
Uzhastin-Nikitathe-homeless-god
authored andcommitted
fix: resolve conflict with package lock file
1 parent 05ac05f commit 2775a7f

File tree

9 files changed

+27793
-21420
lines changed

9 files changed

+27793
-21420
lines changed

package-lock.json

+27,704-21,419
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
"react-dev-utils": "^12.0.0",
9797
"react-dom": "^17.0.2",
9898
"react-refresh": "^0.13.0",
99+
"react-scripts": "^5.0.1",
99100
"redux": "^4.1.2",
100101
"redux-devtools-extension": "^2.13.9",
101102
"redux-thunk": "^2.4.1",
@@ -175,7 +176,6 @@
175176
"@storybook/storybook-deployer": "^2.8.11",
176177
"@storybook/testing-library": "^0.0.9",
177178
"@svgr/rollup": "^6.2.1",
178-
"@svgr/webpack": "^6.2.1",
179179
"@testing-library/dom": "^8.11.3",
180180
"@testing-library/user-event": "^13.5.0",
181181
"@types/classnames": "^2.3.1",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@import 'src/scss/mixins';
2+
3+
.highlight {
4+
color: $color-base;
5+
margin-left: 5px;
6+
margin-right: 5px;
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import React from 'react'
2+
3+
import cx from 'classnames'
4+
5+
import css from './ColorText.styles.module.scss'
6+
7+
export type ColorTextProps = {
8+
isHighlight: boolean
9+
isSpace: boolean
10+
text: string
11+
classNameHighlight?: string
12+
}
13+
14+
export const ColorText = ({ isHighlight, isSpace, text, classNameHighlight }) => {
15+
return (
16+
<span
17+
className={cx({
18+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
19+
[(css.highlight, classNameHighlight)]: isHighlight
20+
})}
21+
>
22+
{isSpace && <>&nbsp;</>}
23+
{<>&nbsp;</>}
24+
{text}
25+
</span>
26+
)
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './ColorText'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from 'react'
2+
3+
import { ComponentStory, ComponentMeta } from '@storybook/react'
4+
5+
import { ColorTexts, ColorTextsProps } from './ColorTexts'
6+
7+
export default {
8+
title: 'atoms/ColorTexts',
9+
component: ColorTexts
10+
} as ComponentMeta<React.ComponentType<ColorTextsProps>>
11+
12+
const Template: ComponentStory<React.ComponentType<ColorTextsProps>> = args => <ColorTexts {...args} />
13+
14+
export const Primary = Template.bind({})
15+
Primary.args = {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.color-text {
2+
display: flex;
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import React from 'react'
2+
3+
import cx from 'classnames'
4+
5+
import { ColorText } from './ColorText'
6+
7+
import css from './ColorTexts.styles.module.scss'
8+
9+
export type ColorTextsProps = {
10+
className?: string
11+
classNameHighlight?: string
12+
words: string[]
13+
step: number
14+
}
15+
16+
export const isHighlight = (index: number, step: number) => {
17+
return (index + 1) % step === 0
18+
}
19+
20+
export const ColorTexts = ({ words, step, className, classNameHighlight }: ColorTextsProps) => {
21+
return (
22+
<div className={cx(css.colorText, className)}>
23+
{words.map((word, index) => (
24+
<ColorText
25+
classNameHighlight={classNameHighlight}
26+
key={word}
27+
isHighlight={isHighlight(index, step)}
28+
isSpace={index === 0}
29+
text={word}
30+
/>
31+
))}
32+
</div>
33+
)
34+
}
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './ColorTexts'

0 commit comments

Comments
 (0)