import { DisplayStringForContentType, SNComponent } from '@standardnotes/snjs' import { Button } from '@/Components/Button/Button' import { FunctionComponent } from 'preact' import { Title, Text, Subtitle, PreferencesSegment } from '@/Components/Preferences/PreferencesComponents' export const ConfirmCustomExtension: FunctionComponent<{ component: SNComponent callback: (confirmed: boolean) => void }> = ({ component, callback }) => { const fields = [ { label: 'Name', value: component.package_info.name, }, { label: 'Description', value: component.package_info.description, }, { label: 'Version', value: component.package_info.version, }, { label: 'Hosted URL', value: component.thirdPartyPackageInfo.url, }, { label: 'Download URL', value: component.package_info.download_url, }, { label: 'Extension Type', value: DisplayStringForContentType(component.content_type), }, ] return ( Confirm Extension {fields.map((field) => { if (!field.value) { return undefined } return ( <> {field.label} {field.value}
) })}
) }