Skip to content

Commit

Permalink
QOL
Browse files Browse the repository at this point in the history
  • Loading branch information
nightmaregaurav committed Nov 10, 2024
1 parent 0cf59c2 commit 2098495
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,38 @@ npm install @nightmaregaurav/react-profile-picture

### Usage
```typescript
import { createEndpointsAndModels } from '@nightmaregaurav/swagger-endpoints-gen';
import React, {CSSProperties} from 'react';
import ProfilePicture from "@nightmaregaurav/react-profile-picture";

interface ProfilePhotoProps {
size: Exclude<CSSProperties["width"], undefined>;
imageUrl: string;
showOnlineBadge: boolean;
isOnline?: boolean;
onlineBadgeColor?: Exclude<CSSProperties["color"], undefined>;
}

const ProfilePhoto = (
{
size,
imageUrl,
showOnlineBadge,
isOnline = false,
onlineBadgeColor = "#44b700",
}: ProfilePhotoProps,
) => {
return (
<ProfilePicture
size={size}
imageUrl={imageUrl}
showOnlineBadge={showOnlineBadge}
isOnline={isOnline}
onlineBadgeColor={onlineBadgeColor}
/>
);
};

export default ProfilePhoto;

```

Expand Down

0 comments on commit 2098495

Please # to comment.