feat: establish composed color field and input group protocols
This commit is contained in:
@@ -55,3 +55,20 @@ const invalidOrientation: ColorSliderOptions = {
|
||||
};
|
||||
void verticalSlider;
|
||||
void invalidOrientation;
|
||||
|
||||
import type { ColorFieldProps } from "../../packages/vue/src/components/color-field/context";
|
||||
const field: ColorFieldProps = {
|
||||
modelValue: color,
|
||||
channel: "alpha",
|
||||
validate: (value) =>
|
||||
value?.getChannelValue("alpha") === 0 ? "transparent" : true,
|
||||
};
|
||||
const wrongValidator: ColorFieldProps = {
|
||||
// @ts-expect-error invalid validation argument type
|
||||
validate: (value: number) => (value > 0 ? true : "invalid"),
|
||||
};
|
||||
// @ts-expect-error no numeric color models
|
||||
const wrongFieldModel: ColorFieldProps = { modelValue: 123 };
|
||||
void field;
|
||||
void wrongValidator;
|
||||
void wrongFieldModel;
|
||||
|
||||
Reference in New Issue
Block a user