feat(client): ts-migrate client/src/components/helpers/** (#42593)
* refactor(client): convert toggle-button to TypeScript
* chore: rename Space to tsx
* refactor(client): convert space to TypeScript
* chore: rename SlimWidthRow to tsx
* refactor(client): slim-width-row to TypeScript
* chore: rename SkeletonSprite to ts
* fix: fixed typos and resolved paths
* chore: resolve path inconsistencies
* refactor(client): skelton-sprite to TypeScript
* chore: rename loader.test to tsx
* chore: add types for react-spinkit
* refactor(client): loader to TypeScript
* refactor(client): link to TypeScript
* refactor(client): image-loader to TypeScript
* refactor(client): full-width-row to TypeScript
* refactor(client): current-challenge-link to TypeScript
* refactor(client): button to TypeScript
* refactor(client): border-color-picker to TypeScript
* refactor(client): avatar-renderer to TypeScript
* chore: changed loadertest(snap) to ts
* chore: optional types added and cleaned files
* fix: args are now optional
* push small updates for Spacer component merge
* update snapshot
* remove type defs from deps
* Revert "remove type defs from deps"
This reverts commit 9f58bf3554
.
* correctly remove client type deps
* final push to remove from deps
Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
660c3b3440
commit
4b44bb37d9
29
client/src/components/helpers/skeleton-sprite.tsx
Normal file
29
client/src/components/helpers/skeleton-sprite.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import React from 'react';
|
||||
|
||||
import styles from './skeleton-styles';
|
||||
|
||||
// TODO: unsure about parameter typing
|
||||
function SkeletonSprite({}: React.FC<
|
||||
React.ComponentPropsWithoutRef<'svg'>
|
||||
>): JSX.Element {
|
||||
return (
|
||||
<div className='sprite-container'>
|
||||
<style dangerouslySetInnerHTML={{ __html: styles }} />
|
||||
<svg className='sprite-svg'>
|
||||
<rect
|
||||
className='sprite'
|
||||
fill='var(--gray-75)'
|
||||
height='100%'
|
||||
stroke='var(--gray-75)'
|
||||
width='2px'
|
||||
x='0'
|
||||
y='0'
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
SkeletonSprite.displayName = 'SkeletonSprite';
|
||||
|
||||
export default SkeletonSprite;
|
Reference in New Issue
Block a user