芝麻web文件管理V1.00
编辑当前文件:/home/ezdajrnh/www/wp-content/plugins/better-wp-security/core/packages/schema-form/src/index.js
/** * External dependencies */ import { Link } from 'react-router-dom'; /** * WordPress dependencies */ import { Card, CardBody, Flex, FlexItem } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; import { useInstanceId } from '@wordpress/compose'; import { forwardRef } from '@wordpress/element'; /** * iThemes dependencies */ import { Button } from '@ithemes/ui'; /** * Internal dependencies */ import { withNavigate } from '@ithemes/security-hocs'; import { ErrorList, FlexSpacer } from '@ithemes/security-ui'; import { StyledSchemaForm } from './styles'; export function PrimarySchemaForm( { saveLabel, isSaving, saveDisabled, cancelLabel, onCancel, cancelRoute, undoLabel, undoDisabled, onUndo, children, errors, apiError, schemaError, withCard, alignActions, ...rest } ) { let id = useInstanceId( PrimarySchemaForm, 'itsec-schema-form' ); id = rest.id || id; const form = ( <>
> ); return (
{ withCard && (
{ form }
) } { ! withCard && form }
{ children }
); } export const PrimarySchemaFormInputs = forwardRef( ( { className, ...rest }, ref ) => { return (
<>>
); } ); export function PrimarySchemaFormActions( { id, saveLabel = __( 'Save', 'better-wp-security' ), isSaving, saveDisabled, cancelLabel = __( 'Cancel', 'better-wp-security' ), onCancel, cancelRoute, undoLabel = __( 'Undo Changes', 'better-wp-security' ), undoDisabled, onUndo, align, children, } ) { return (
{ onCancel && (
{ cancelLabel }
) } { cancelRoute && (
{ cancelLabel }
) } { ! align && (
) } { children } { onUndo && (
{ undoLabel }
) }
{ saveLabel }
); }