Download wp-calypso/client/reader/components/skeleton/index.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 604 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/reader/components/skeleton/index.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/reader/components/skeleton/index.tsx
-
curl -L -o index.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/reader/components/skeleton/index.tsx
604 Bytes
| import clsx from 'clsx'; | |
| import React from 'react'; | |
| import './style.scss'; | |
| interface Props extends React.HTMLAttributes< HTMLDivElement > { | |
| shape?: 'circle' | 'rect'; | |
| height?: string; | |
| width?: string; | |
| } | |
| const Skeleton = ( { shape = 'rect', height, width, style, className, ...rest }: Props ) => { | |
| const classes = clsx( | |
| 'skeleton', | |
| { | |
| 'skeleton--circle': shape === 'circle', | |
| }, | |
| className | |
| ); | |
| const styles = { | |
| ...style, | |
| ...( height && { height } ), | |
| ...( width && { width } ), | |
| }; | |
| return <div { ...rest } className={ classes } style={ styles }></div>; | |
| }; | |
| export default Skeleton; | |