@metamask/snaps-sdk
Version:
A library containing the core functionality for building MetaMask Snaps
21 lines • 806 B
JavaScript
import { createSnapComponent } from "../../component.mjs";
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>
*/
export const Dropdown = createSnapComponent(TYPE);
//# sourceMappingURL=Dropdown.mjs.map