Files
NapCatQQ/.pnpm-store/v3/files/88/6473485c4b51e922c936496e48944edcea7eed8d7b19012ce10c865cdd065527f833eb22241119d35731303c17bae9e757d64f1cff69e013c2ac9acc7447df
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

49 lines
1.5 KiB
Plaintext

/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import {ReactNode} from 'react';
export type LabelPosition = 'top' | 'side';
export type Alignment = 'start' | 'end';
export type NecessityIndicator = 'icon' | 'label';
export interface LabelableProps {
/** The content to display as the label. */
label?: ReactNode
}
export interface SpectrumLabelableProps extends LabelableProps {
/**
* The label's overall position relative to the element it is labeling.
* @default 'top'
*/
labelPosition?: LabelPosition,
/**
* The label's horizontal alignment relative to the element it is labeling.
* @default 'start'
*/
labelAlign?: Alignment,
/**
* Whether the required state should be shown as an icon or text.
* @default 'icon'
*/
necessityIndicator?: NecessityIndicator,
/**
* Whether the label is labeling a required field or group.
*/
isRequired?: boolean,
/**
* A ContextualHelp element to place next to the label.
*/
contextualHelp?: ReactNode
}