Download wp-calypso/client/components/activity-card/activity-media.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 668 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/activity-card/activity-media.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/components/activity-card/activity-media.tsx
-
curl -L -o activity-media.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/activity-card/activity-media.tsx
668 Bytes
| import { Gridicon } from '@automattic/components'; | |
| import { FunctionComponent } from 'react'; | |
| interface Props { | |
| icon?: string; | |
| thumbnail?: string; | |
| fullImage?: string; | |
| name: string; | |
| } | |
| const ActivityMedia: FunctionComponent< Props > = ( { icon, thumbnail, fullImage, name } ) => ( | |
| <div className="activity-card__activity-media"> | |
| { icon && <Gridicon icon={ icon } size={ 48 } /> } | |
| { thumbnail && ( | |
| <img src={ thumbnail } alt={ name } className="activity-card__activity-media-thumbnail" /> | |
| ) } | |
| { fullImage && ( | |
| <img src={ fullImage } alt={ name } className="activity-card__activity-media-full-width" /> | |
| ) } | |
| </div> | |
| ); | |
| export default ActivityMedia; | |