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: Button.tsx
import React from 'react' import classnames from 'classnames' import type { ButtonHTMLAttributes } from 'react' export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'id' | 'name'> { id?: string name?: string primary?: boolean secondary?: boolean small?: boolean large?: boolean link?: boolean } export const Button: React.FC<ButtonProps> = ({ id, children, className, name, primary = false, secondary = false, small = false, large = false, link = false, type = 'button', onClick, ...props }) => <button id={id ?? name} name={name} type={type} {...props} onClick={event => { if (onClick) { event.preventDefault() onClick(event) } }} className={classnames('button', className, { 'button-primary': primary, 'button-secondary': secondary, 'button-large': large, 'button-small': small, 'button-link': link })} > {children} </button>
Upload File
Create Folder