Skip to main content
Glama
reflagcom

Bucket Feature Flags MCP Server

Official
by reflagcom
Switch.tsx1.13 kB
import { Fragment, h } from "preact"; interface SwitchProps extends h.JSX.HTMLAttributes<HTMLInputElement> { checked: boolean; width?: number; height?: number; } const gutter = 1; export function Switch({ checked, width = 24, height = 14, ...props }: SwitchProps) { return ( <> <label class="switch" data-enabled={checked}> <input checked={checked} class="switch-input" name="enabled" type="checkbox" {...props} /> <div class="switch-track" style={{ width: `${width}px`, height: `${height}px`, borderRadius: `${height}px`, }} > <div class="switch-dot" style={{ width: `${height - gutter * 2}px`, height: `${height - gutter * 2}px`, transform: checked ? `translateX(${width - (height - gutter * 2) - gutter}px)` : `translateX(${gutter}px)`, top: `${gutter}px`, }} /> </div> </label> </> ); }

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/reflagcom/bucket-javascript-sdk'

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