Skip to content

Commit

Permalink
fix: resolve conflict with package lock file
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzhastin-Nikita authored and the-homeless-god committed May 26, 2022
1 parent 05ac05f commit 2775a7f
Show file tree
Hide file tree
Showing 9 changed files with 27,793 additions and 21,420 deletions.
49,123 changes: 27,704 additions & 21,419 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
"react-dev-utils": "^12.0.0",
"react-dom": "^17.0.2",
"react-refresh": "^0.13.0",
"react-scripts": "^5.0.1",
"redux": "^4.1.2",
"redux-devtools-extension": "^2.13.9",
"redux-thunk": "^2.4.1",
Expand Down Expand Up @@ -175,7 +176,6 @@
"@storybook/storybook-deployer": "^2.8.11",
"@storybook/testing-library": "^0.0.9",
"@svgr/rollup": "^6.2.1",
"@svgr/webpack": "^6.2.1",
"@testing-library/dom": "^8.11.3",
"@testing-library/user-event": "^13.5.0",
"@types/classnames": "^2.3.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@import 'src/scss/mixins';

.highlight {
color: $color-base;
margin-left: 5px;
margin-right: 5px;
}
27 changes: 27 additions & 0 deletions src/components/atoms/ColorTexts/ColorText/ColorText.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from 'react'

import cx from 'classnames'

import css from './ColorText.styles.module.scss'

export type ColorTextProps = {
isHighlight: boolean
isSpace: boolean
text: string
classNameHighlight?: string
}

export const ColorText = ({ isHighlight, isSpace, text, classNameHighlight }) => {
return (
<span
className={cx({
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
[(css.highlight, classNameHighlight)]: isHighlight
})}
>
{isSpace && <>&nbsp;</>}
{<>&nbsp;</>}
{text}
</span>
)
}
1 change: 1 addition & 0 deletions src/components/atoms/ColorTexts/ColorText/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './ColorText'
15 changes: 15 additions & 0 deletions src/components/atoms/ColorTexts/ColorTexts.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react'

import { ComponentStory, ComponentMeta } from '@storybook/react'

import { ColorTexts, ColorTextsProps } from './ColorTexts'

export default {
title: 'atoms/ColorTexts',
component: ColorTexts
} as ComponentMeta<React.ComponentType<ColorTextsProps>>

const Template: ComponentStory<React.ComponentType<ColorTextsProps>> = args => <ColorTexts {...args} />

export const Primary = Template.bind({})
Primary.args = {}
3 changes: 3 additions & 0 deletions src/components/atoms/ColorTexts/ColorTexts.styles.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.color-text {
display: flex;
}
34 changes: 34 additions & 0 deletions src/components/atoms/ColorTexts/ColorTexts.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React from 'react'

import cx from 'classnames'

import { ColorText } from './ColorText'

import css from './ColorTexts.styles.module.scss'

export type ColorTextsProps = {
className?: string
classNameHighlight?: string
words: string[]
step: number
}

export const isHighlight = (index: number, step: number) => {
return (index + 1) % step === 0
}

export const ColorTexts = ({ words, step, className, classNameHighlight }: ColorTextsProps) => {
return (
<div className={cx(css.colorText, className)}>
{words.map((word, index) => (
<ColorText
classNameHighlight={classNameHighlight}
key={word}
isHighlight={isHighlight(index, step)}
isSpace={index === 0}
text={word}
/>
))}
</div>
)
}
1 change: 1 addition & 0 deletions src/components/atoms/ColorTexts/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './ColorTexts'

0 comments on commit 2775a7f

Please sign in to comment.