-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #107 from the-ai-team/feature/105-race-page-updates
[Related #105] Race page refinements
- Loading branch information
Showing
28 changed files
with
440 additions
and
86 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Sound Effect by <a href="https://pixabay.com/users/irinairinafomicheva-25140203/?utm_source=link-attribution&utm_medium=referral&utm_campaign=music&utm_content=13692">irinairinafomicheva</a> from <a href="https://pixabay.com/sound-effects//?utm_source=link-attribution&utm_medium=referral&utm_campaign=music&utm_content=13692">Pixabay</a> | ||
License - https://pixabay.com/service/license-summary/ |
Binary file not shown.
50 changes: 39 additions & 11 deletions
50
apps/client/src/components/atoms/cursor/Cursor.component.tsx
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 |
---|---|---|
@@ -1,27 +1,55 @@ | ||
import { ReactElement } from 'react'; | ||
import cs from 'classnames'; | ||
import { ReactComponent as LockIcon } from 'pixelarticons/svg/lock.svg'; | ||
|
||
export interface CursorProps { | ||
isDebug?: boolean; | ||
isAtSpace?: boolean; | ||
isInvalidCursor?: boolean; | ||
isLocked?: boolean; | ||
} | ||
|
||
export function Cursor({ | ||
isDebug = false, | ||
isAtSpace = false, | ||
isInvalidCursor = false, | ||
isLocked = false, | ||
}: CursorProps): ReactElement { | ||
return ( | ||
<span | ||
className={cs( | ||
'absolute h-full w-[20px] top-[0.5px]', | ||
{ | ||
'left-[-0.5px]': !isAtSpace, | ||
'left-[0.5px]': isAtSpace, | ||
'bg-primary-30 bg-opacity-60': isDebug, | ||
}, | ||
'animate-cursor-blink', | ||
)}> | ||
<div className={cs('bg-neutral-90', 'h-full w-[2.5px] rounded-full')} /> | ||
<span className='z-10 relative'> | ||
<span | ||
className={cs( | ||
'absolute h-full w-[20px] top-[0.5px]', | ||
{ | ||
'left-[-0.5px]': !isAtSpace, | ||
'left-[0.5px]': isAtSpace, | ||
'bg-primary-30 bg-opacity-60': isDebug, | ||
'animate-cursor-blink': !isLocked, | ||
}, | ||
'py-[0.075em]', | ||
)}> | ||
{isLocked && ( | ||
<div | ||
className={cs( | ||
'absolute -left-[.35em] top-0 w-full h-full flex items-center justify-center', | ||
'scale-150', | ||
)}> | ||
<LockIcon | ||
className={cs( | ||
'w-5 h-5 p-[0.085em]', | ||
'bg-surface rounded-full', | ||
'border border-neutral-90', | ||
)} | ||
/> | ||
</div> | ||
)} | ||
<div | ||
className={cs('h-full w-[2.5px] rounded-full', { | ||
'bg-error-50': isInvalidCursor, | ||
'bg-neutral-90': !isInvalidCursor, | ||
})} | ||
/> | ||
</span> | ||
</span> | ||
); | ||
} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export * as Connection from './connection'; | ||
export * as Race from './race'; | ||
export * as RaceConstants from './race'; | ||
export * as TextStyles from './text-styles'; | ||
export * as Time from './time'; |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
export const MAX_INVALID_CHARS_ALLOWED = 5; | ||
export const MIN_RACE_TRACKS = 5; |
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
Oops, something went wrong.