wip
This commit is contained in:
@@ -12,7 +12,14 @@ import cx from "classnames";
|
||||
import { FieldProps } from "./Field";
|
||||
import { Orienter } from "./Orienter";
|
||||
import { Typography } from "@/src/components/Typography/Typography";
|
||||
import { Accessor, Component, ComponentProps, For, Show, splitProps } from "solid-js";
|
||||
import {
|
||||
Accessor,
|
||||
Component,
|
||||
ComponentProps,
|
||||
For,
|
||||
Show,
|
||||
splitProps,
|
||||
} from "solid-js";
|
||||
import { Tag } from "@/src/components/Tag/Tag";
|
||||
import { PolymorphicProps } from "@kobalte/core/polymorphic";
|
||||
import { TextFieldInputProps } from "@kobalte/core/text-field";
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
div.form-field.machine-tags {
|
||||
|
||||
div.control {
|
||||
@apply flex flex-col size-full gap-2;
|
||||
|
||||
|
||||
@@ -78,10 +78,11 @@ export const MachineTags = (props: MachineTagsProps) => {
|
||||
sortedAndUniqueOptions([...staticOptions, ...defaultValue]),
|
||||
);
|
||||
|
||||
|
||||
const addOptionAndSelect = (option: MachineTag) => {
|
||||
// add to the list of available options first
|
||||
setAvailableOptions(sortedAndUniqueOptions([...availableOptions(), option]));
|
||||
setAvailableOptions(
|
||||
sortedAndUniqueOptions([...availableOptions(), option]),
|
||||
);
|
||||
|
||||
// update the selected options
|
||||
setSelectedOptions(sortedAndUniqueOptions([...selectedOptions(), option]));
|
||||
|
||||
@@ -44,8 +44,14 @@ export const Default: Story = {
|
||||
<SidebarSectionForm
|
||||
title="General"
|
||||
schema={v.object({
|
||||
firstName: v.pipe(v.string(), v.nonEmpty("Please enter a first name.")),
|
||||
lastName: v.pipe(v.string(), v.nonEmpty("Please enter a last name.")),
|
||||
firstName: v.pipe(
|
||||
v.string(),
|
||||
v.nonEmpty("Please enter a first name."),
|
||||
),
|
||||
lastName: v.pipe(
|
||||
v.string(),
|
||||
v.nonEmpty("Please enter a last name."),
|
||||
),
|
||||
bio: v.string(),
|
||||
shareProfile: v.optional(v.boolean()),
|
||||
})}
|
||||
|
||||
@@ -25,7 +25,7 @@ export const Machine = (props: RouteSectionProps) => {
|
||||
<SectionTags {...sectionProps} />
|
||||
</SidebarPane>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Show when={useMachineName()} keyed>
|
||||
|
||||
@@ -25,7 +25,6 @@ export interface SectionGeneralProps {
|
||||
}
|
||||
|
||||
export const SectionGeneral = (props: SectionGeneralProps) => {
|
||||
|
||||
const machineQuery = props.machineQuery;
|
||||
|
||||
const initialValues = () => {
|
||||
|
||||
Reference in New Issue
Block a user