mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +02:00
refactor(ui/box-selector): replace all selectors [EE-3856] (#7902)
This commit is contained in:
parent
c9253319d9
commit
2dddc1c6b9
80 changed files with 1267 additions and 1011 deletions
|
@ -1,44 +1,58 @@
|
|||
import { Edit, FileText, Globe, Upload } from 'lucide-react';
|
||||
import { Edit, FileText, Globe, UploadCloud } from 'lucide-react';
|
||||
|
||||
import GitIcon from '@/assets/ico/git.svg?c';
|
||||
|
||||
import { BadgeIcon } from '@@/BadgeIcon';
|
||||
|
||||
import { BoxSelectorOption } from '../types';
|
||||
|
||||
export const editor: BoxSelectorOption<'editor'> = {
|
||||
id: 'method_editor',
|
||||
icon: <BadgeIcon icon={Edit} />,
|
||||
icon: Edit,
|
||||
iconType: 'badge',
|
||||
label: 'Web editor',
|
||||
description: 'Use our Web editor',
|
||||
value: 'editor',
|
||||
};
|
||||
|
||||
export const upload: BoxSelectorOption<'upload'> = {
|
||||
id: 'method_upload',
|
||||
icon: <BadgeIcon icon={Upload} />,
|
||||
icon: UploadCloud,
|
||||
iconType: 'badge',
|
||||
label: 'Upload',
|
||||
description: 'Upload from your computer',
|
||||
value: 'upload',
|
||||
};
|
||||
|
||||
export const git: BoxSelectorOption<'repository'> = {
|
||||
id: 'method_repository',
|
||||
icon: <GitIcon />,
|
||||
icon: GitIcon,
|
||||
iconType: 'logo',
|
||||
label: 'Repository',
|
||||
description: 'Use a git repository',
|
||||
value: 'repository',
|
||||
};
|
||||
|
||||
export const template: BoxSelectorOption<'template'> = {
|
||||
export const edgeStackTemplate: BoxSelectorOption<'template'> = {
|
||||
id: 'method_template',
|
||||
icon: <BadgeIcon icon={FileText} />,
|
||||
icon: FileText,
|
||||
iconType: 'badge',
|
||||
label: 'Template',
|
||||
description: 'Use an Edge stack template',
|
||||
value: 'template',
|
||||
};
|
||||
|
||||
export const customTemplate: BoxSelectorOption<'template'> = {
|
||||
id: 'method_template',
|
||||
icon: FileText,
|
||||
iconType: 'badge',
|
||||
label: 'Custom template',
|
||||
description: 'Use a custom template',
|
||||
value: 'template',
|
||||
};
|
||||
|
||||
export const url: BoxSelectorOption<'url'> = {
|
||||
id: 'method_url',
|
||||
icon: <BadgeIcon icon={Globe} />,
|
||||
icon: Globe,
|
||||
iconType: 'badge',
|
||||
label: 'URL',
|
||||
description: 'Specify a URL to a file',
|
||||
value: 'url',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue