({ label, value }: CredentialRowProps)
| 222 | } |
| 223 | |
| 224 | const CredentialRow = ({ label, value }: CredentialRowProps): ReactElement => { |
| 225 | const [, copy] = useCopyText(); |
| 226 | |
| 227 | return ( |
| 228 | <div className="flex flex-col gap-1"> |
| 229 | <Typography type={TypographyType.Footnote} bold> |
| 230 | {label} |
| 231 | </Typography> |
| 232 | <div className="flex items-center gap-2 rounded-12 bg-surface-float p-3"> |
| 233 | <code className="min-w-0 flex-1 break-all text-text-primary"> |
| 234 | {value} |
| 235 | </code> |
| 236 | <Button |
| 237 | variant={ButtonVariant.Tertiary} |
| 238 | size={ButtonSize.Small} |
| 239 | icon={<CopyIcon />} |
| 240 | onClick={() => |
| 241 | copy({ |
| 242 | textToCopy: value, |
| 243 | message: `${label} copied to clipboard`, |
| 244 | }) |
| 245 | } |
| 246 | className="shrink-0" |
| 247 | /> |
| 248 | </div> |
| 249 | </div> |
| 250 | ); |
| 251 | }; |
| 252 | |
| 253 | interface OAuthCredentialsModalProps { |
| 254 | client: OAuthClient; |
nothing calls this directly
no test coverage detected