MCPcopy Index your code
hub / github.com/simstudioai/sim / getItemStateClasses

Function getItemStateClasses

packages/emcn/src/components/popover/popover.tsx:140–152  ·  view source on GitHub ↗

* Gets the active/hover classes for a popover item. * Uses variant for secondary, otherwise colorScheme determines default vs inverted.

(
  variant: PopoverVariant,
  colorScheme: PopoverColorScheme,
  isActive: boolean
)

Source from the content-addressed store, hash-verified

138 * Uses variant for secondary, otherwise colorScheme determines default vs inverted.
139 */
140function getItemStateClasses(
141 variant: PopoverVariant,
142 colorScheme: PopoverColorScheme,
143 isActive: boolean
144): string {
145 const state = isActive ? 'active' : 'hover'
146
147 if (variant === 'secondary') {
148 return STYLES.states.secondary[state]
149 }
150
151 return colorScheme === 'inverted' ? STYLES.states.inverted[state] : STYLES.states.default[state]
152}
153
154interface PopoverContextValue {
155 openFolder: (

Callers 1

popover.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected