Skip to main content
Glama
Arize-ai

@arizeai/phoenix-mcp

Official
by Arize-ai
ClearableSelect.tsx1.93 kB
import { ReactNode } from "react"; import { Label } from "react-aria-components"; import { css } from "@emotion/react"; import { Button } from "@phoenix/components/button"; import { Icon, Icons, SelectChevronUpDownIcon } from "@phoenix/components/icon"; import { Popover } from "@phoenix/components/overlay"; import { Select } from "./Select"; import { SelectValue } from "./SelectValue"; type ClearableSelectProps = { value: string | null; onChange: (value: string | undefined) => void; label: string; placeholder?: string; children: ReactNode; }; const clearableSelectCSS = css` display: flex; flex-direction: column; gap: var(--ac-global-dimension-size-50); & .field-row { display: flex; flex-direction: row; & .ac-select { flex: 1 1 auto; } & .select-button { width: 100%; border-top-right-radius: 0; border-bottom-right-radius: 0; } & .clear-button { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: none; } } `; export const ClearableSelect = ({ value, onChange, label, placeholder, children, }: ClearableSelectProps) => { return ( <div css={clearableSelectCSS}> <Label>{label}</Label> <div className="field-row"> <Select value={value} onChange={(key) => onChange(typeof key === "string" ? key : undefined) } placeholder={placeholder} > <Button className="select-button"> <SelectValue /> <SelectChevronUpDownIcon /> </Button> <Popover>{children}</Popover> </Select> <Button className="clear-button" aria-label={`Clear ${label}`} isDisabled={value === null} leadingVisual={<Icon svg={<Icons.CloseOutline />} />} onPress={() => onChange(undefined)} /> </div> </div> ); };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Arize-ai/phoenix'

If you have feedback or need assistance with the MCP directory API, please join our Discord server