XYZ File Manager
Current Path:
/var/www/wordpress/wp-content/plugins/code-snippets/js/components/common
var
/
www
/
wordpress
/
wp-content
/
plugins
/
code-snippets
/
js
/
components
/
common
/
📁
..
📄
Badge.tsx
(838 B)
📄
Button.tsx
(929 B)
📄
ConfirmDialog.tsx
(1.1 KB)
📄
CopyToClipboardButton.tsx
(1.64 KB)
📄
DismissableNotice.tsx
(700 B)
📄
SubmitButton.tsx
(913 B)
📄
Tooltip.tsx
(681 B)
📄
UpsellBanner.tsx
(1.16 KB)
📄
UpsellDialog.tsx
(2.11 KB)
📁
icons
Editing: Badge.tsx
import React from 'react' import classnames from 'classnames' import type { ReactNode } from 'react' import type { SnippetType } from '../../types/Snippet' export type BadgeName = SnippetType | 'core' | 'pro' | 'ai' | 'cloud' | 'bundles' | 'cloud_search' | 'beta' const badgeIcons: Partial<Record<BadgeName, string>> = { cond: 'randomize', cloud: 'cloud', bundles: 'screenoptions', cloud_search: 'search' } export interface BadgeProps { name: BadgeName small?: boolean inverted?: boolean children?: ReactNode } export const Badge: React.FC<BadgeProps> = ({ name, small, inverted, children }) => <span className={classnames('badge', `${name}-badge`, { 'small-badge': small, 'inverted-badge': inverted })}> {badgeIcons[name] ? <span className={`dashicons dashicons-${badgeIcons[name]}`} /> : children ?? name} </span>
Upload File
Create Folder