kyd-shared-badge 0.2.18 → 0.2.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kyd-shared-badge",
3
- "version": "0.2.18",
3
+ "version": "0.2.19",
4
4
  "private": false,
5
5
  "main": "./src/index.ts",
6
6
  "module": "./src/index.ts",
@@ -97,7 +97,14 @@ const ScoreCard = ({ title, score, description, descriptor, scoreType, iconImage
97
97
  );
98
98
  };
99
99
 
100
- const SharedBadgeDisplay = ({ badgeData }: { badgeData: PublicBadgeData }) => {
100
+ type SharedBadgeDisplayProps = {
101
+ badgeData: PublicBadgeData;
102
+ hideShareButton?: boolean;
103
+ showMakePublicButton?: boolean;
104
+ onMakePublic?: () => void;
105
+ };
106
+
107
+ const SharedBadgeDisplay = ({ badgeData, hideShareButton = false, showMakePublicButton = false, onMakePublic }: SharedBadgeDisplayProps) => {
101
108
  const { badgeId, developerName, assessmentResult, updatedAt, connectedPlatforms } = badgeData;
102
109
  const { summary_scores, report_summary, developer_trust_explanation, key_skills, screening_sources, industry_considerations } = assessmentResult;
103
110
 
@@ -109,14 +116,25 @@ const SharedBadgeDisplay = ({ badgeData }: { badgeData: PublicBadgeData }) => {
109
116
 
110
117
  return (
111
118
  <div className={`${wrapperMaxWidth} mx-auto`}>
112
- <div className="flex justify-end items-center mb-4">
113
- <ShareButton
114
- badgeId={badgeId}
115
- shareTitle={`KYD Self-Check™ Report | ${badgeData.developerName}`}
116
- shareText="Check out my KYD Self-Check™ from Know Your Developer™"
117
- buttonText="Share"
118
- className={'flex items-center justify-center h-10 w-10 sm:w-auto sm:px-4 sm:py-2 text-white rounded-full sm:rounded-md transition-all duration-300 ease-in-out bg-[var(--icon-accent)] hover:bg-[var(--icon-accent-hover)]'}
119
- />
119
+ <div className="flex justify-end items-center gap-3 mb-4">
120
+ {!hideShareButton && (
121
+ <ShareButton
122
+ badgeId={badgeId}
123
+ shareTitle={`KYD Self-Check™ Report | ${badgeData.developerName}`}
124
+ shareText="Check out my KYD Self-Check™ from Know Your Developer™"
125
+ buttonText="Share"
126
+ className={'flex items-center justify-center h-10 w-10 sm:w-auto sm:px-4 sm:py-2 text-white rounded-full sm:rounded-md transition-all duration-300 ease-in-out bg-[var(--icon-accent)] hover:bg-[var(--icon-accent-hover)]'}
127
+ />
128
+ )}
129
+ {showMakePublicButton && (
130
+ <button
131
+ onClick={() => { if (onMakePublic) onMakePublic(); }}
132
+ className={'px-4 py-2 text-sm font-semibold text-white rounded-md'}
133
+ style={{ backgroundColor: 'var(--icon-accent)'}}
134
+ >
135
+ Make Public
136
+ </button>
137
+ )}
120
138
  </div>
121
139
  <ReportHeader
122
140
  badgeId={badgeId}