UNPKG

@metamask/snaps-sdk

Version:

A library containing the core functionality for building MetaMask Snaps

24 lines 915 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Dropdown = void 0; const component_1 = require("../../component.cjs"); const TYPE = 'Dropdown'; /** * A dropdown component, which is used to create a dropdown. * * @param props - The props of the component. * @param props.name - The name of the dropdown field. This is used to identify the * state in the form data. * @param props.value - The selected value of the dropdown. * @param props.children - The children of the dropdown. * @param props.disabled - Whether the dropdown is disabled. * @returns A dropdown element. * @example * <Dropdown name="dropdown"> * <Option value="option1">Option 1</Option> * <Option value="option2">Option 2</Option> * <Option value="option3">Option 3</Option> * </Dropdown> */ exports.Dropdown = (0, component_1.createSnapComponent)(TYPE); //# sourceMappingURL=Dropdown.cjs.map