-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EPMRPP-91645 || Added collapsed state for field text (#43)
* EPMRPP-91645 || Added collapsed state for field text * EPMRPP-91645 || Updated storybook version * EPMRPP-91645 || added spin Loader * EPMRPP-91645 || revert .prettierrc changes * EPMRPP-91645 || code review fix - 1 * EPMRPP-91645 || small fix * EPMRPP-91645 || added cursor:pointer to startIcon * EPMRPP-91645 || code review fix - 2
- Loading branch information
1 parent
87bd9f4
commit 24da190
Showing
12 changed files
with
1,845 additions
and
5,738 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
"trailingComma": "all", | ||
"printWidth": 100, | ||
"bracketSpacing": true | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { SpinLoader } from './spinLoader'; | ||
|
||
export { SpinLoader }; | ||
|
||
export default SpinLoader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.spin-loader { | ||
width: 16px; | ||
height: 16px; | ||
margin: 3px 7px 3px 3px; | ||
flex-shrink: 0; | ||
} | ||
|
||
.spinner { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
width: 100%; | ||
height: 100%; | ||
border-radius: 50%; | ||
flex-shrink: 0; | ||
position: relative; | ||
mask: radial-gradient(circle, transparent 55%, var(--rp-ui-color-primary) 0%); | ||
|
||
&.color-topaz { | ||
background: conic-gradient(transparent 0%, var(--rp-ui-color-primary)); | ||
} | ||
|
||
animation: spin 1s infinite linear; | ||
} | ||
|
||
|
||
@keyframes spin { | ||
to { | ||
transform: rotate(1turn); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { SpinLoader } from './spinLoader'; | ||
|
||
const meta: Meta<typeof SpinLoader> = { | ||
title: 'Spinner Loader', | ||
component: SpinLoader, | ||
parameters: { | ||
layout: 'centered', | ||
}, | ||
tags: ['autodocs'], | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof SpinLoader>; | ||
|
||
export const Default: Story = { | ||
args: {}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { FC, ReactElement } from 'react'; | ||
import classNames from 'classnames/bind'; | ||
import styles from './spinLoader.module.scss'; | ||
|
||
const cx = classNames.bind(styles); | ||
|
||
interface SpinLoaderProps { | ||
color?: string; | ||
className?: string; | ||
} | ||
|
||
export const SpinLoader: FC<SpinLoaderProps> = ({ color = 'topaz', className }): ReactElement => ( | ||
<div className={cx('spin-loader', className)}> | ||
<div className={cx('spinner', { [`color-${color}`]: color })} /> | ||
</div> | ||
); |