import { Avatar, Breadcrumbs, Button, Card, Checkbox, Chip, Combobox, FieldLabel, Flex, Link, SearchField, SegmentedControl, Tab, Text, TextField, NumberField, SelectCard, Grid, } from '@servicetitan/anvil2'; import MenuIcon from "@servicetitan/anvil2/assets/icons/material/round/menu.svg"; import { FC, useState } from 'react'; import '../anvil2.css'; type ItemType = { id: string; label: string }; const comboItems: ItemType[] = [ { id: '1', label: 'Item 1' }, { id: '2', label: 'Item 2' }, { id: '3', label: 'Item 3' }, { id: '4', label: 'Item 4' } ] function SegmentedControlBox() { const [selected, setSelected] = useState("level 2"); return ( Level 1 Level 2 Level 3 Level 4 ); } function SelectCardBox() { return ( {[ { id: "1", label: "Cooling Tune Up", cost: "$100", timeEstimate: "1 hour", }, { id: "2", label: "Heating Tune Up", cost: "$150", timeEstimate: "2 hours", }, { id: "3", label: "Air Duct Cleaning", cost: "$200", timeEstimate: "3 hours", }, ].map((item) => ( {item.label} ~{item.timeEstimate} ))} ); } export const BasicCard: FC<{ className?: string }> = ({ className }) => ( Home Page Sub Page Current Page lorem ipsum text lorem ipsum text
lorem ipsum text
Customer Name Customer Name some link some link Summary Transcript Summary Transcript short
); export const ComboboxCard: FC<{ className?: string }> = ({ className }) => (
(item?.label ?? '')} selectedItem={comboItems[0]} onChange={() => {}} filterOptions={{ keys: ['name'] }} > {({ items }) => ( {items.map((item, i) => ( {item.label} ))} )}
items={comboItems} multiple selectedItems={[comboItems[0]]} itemToString={item => item?.label ?? ''} disableCloseOnSelectItem > > {({ items }) => ( {items.map((item, i) => ( {item.label} ))} )}
); export const AutoExample: FC = () => ( );