How to use the @fluentui/react.Dropdown.slotClassNames function in @fluentui/react

To help you get started, we’ve selected a few @fluentui/react examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / fluent-ui-react / docs / src / examples / components / Dropdown / Types / DropdownExampleSearchMultiple.shorthand.steps.ts View on Github external
selectedItem: (itemIndex: number) =>
    `.${Dropdown.slotClassNames.selectedItems} span:nth-child(${itemIndex})`,
}
github microsoft / fluent-ui-react / docs / src / examples / components / Dropdown / Types / DropdownExampleClearable.shorthand.steps.ts View on Github external
import { Dropdown } from '@fluentui/react'

const selectors = {
  clearIndicator: `.${Dropdown.slotClassNames.clearIndicator}`,
  triggerButton: `.${Dropdown.slotClassNames.triggerButton}`,
  item: (itemIndex: number) => `.${Dropdown.slotClassNames.itemsList} li:nth-child(${itemIndex})`,
}

const config: ScreenerTestsConfig = {
  steps: [
    builder =>
      builder
        .click(selectors.triggerButton)
        .click(selectors.item(3))
        .snapshot('Selects an item')
        .click(selectors.clearIndicator)
        .snapshot('Clears the value'),
  ],
}

export default config
github microsoft / fluent-ui-react / docs / src / examples / components / Dropdown / Rtl / DropdownExample.rtl.steps.ts View on Github external
import { Dropdown } from '@fluentui/react'

const selectors = {
  triggerButton: `.${Dropdown.slotClassNames.triggerButton}`,
  item: (itemIndex: number) => `.${Dropdown.slotClassNames.itemsList} li:nth-child(${itemIndex})`,
}

export const config: ScreenerTestsConfig = {
  steps: [
    builder =>
      builder
        .click(selectors.triggerButton)
        .snapshot('RTL: Shows list')
        .click(selectors.item(3))
        .snapshot('RTL: Selects an item'),
  ],
}

export default config
github microsoft / fluent-ui-react / docs / src / examples / components / Popup / Usage / PopupExampleCloseButton.shorthand.steps.ts View on Github external
  item: (itemIndex: number) => `.${Dropdown.slotClassNames.itemsList} li:nth-child(${itemIndex})`,
  popupTrigger: `.${Button.className}`,
github microsoft / fluent-ui-react / docs / src / examples / components / Dropdown / Types / DropdownExample.shorthand.steps.ts View on Github external
  item: (itemIndex: number) => `.${Dropdown.slotClassNames.itemsList} li:nth-child(${itemIndex})`,
}
github microsoft / fluent-ui-react / docs / src / examples / components / Dropdown / Types / DropdownExampleClearable.shorthand.steps.ts View on Github external
import { Dropdown } from '@fluentui/react'

const selectors = {
  clearIndicator: `.${Dropdown.slotClassNames.clearIndicator}`,
  triggerButton: `.${Dropdown.slotClassNames.triggerButton}`,
  item: (itemIndex: number) => `.${Dropdown.slotClassNames.itemsList} li:nth-child(${itemIndex})`,
}

const config: ScreenerTestsConfig = {
  steps: [
    builder =>
      builder
        .click(selectors.triggerButton)
        .click(selectors.item(3))
        .snapshot('Selects an item')
        .click(selectors.clearIndicator)
        .snapshot('Clears the value'),
  ],
}
github microsoft / fluent-ui-react / docs / src / examples / components / Dropdown / Types / DropdownExample.shorthand.steps.ts View on Github external
import { Dropdown } from '@fluentui/react'

const selectors = {
  triggerButton: `.${Dropdown.slotClassNames.triggerButton}`,
  item: (itemIndex: number) => `.${Dropdown.slotClassNames.itemsList} li:nth-child(${itemIndex})`,
}

const config: ScreenerTestsConfig = {
  themes: ['teams', 'teamsDark', 'teamsHighContrast'],
  steps: [
    builder => builder.click(selectors.triggerButton).snapshot('Shows list'),
    builder =>
      builder
        .click(selectors.triggerButton)
        .click(selectors.item(3))
        .snapshot('Selects an item')
        .click(selectors.triggerButton)
        .snapshot('Opens with selected item highlighted')
        .hover(selectors.item(2))
        .snapshot('Highlights another item')
github microsoft / fluent-ui-react / docs / src / examples / components / Dropdown / Rtl / DropdownExample.rtl.steps.ts View on Github external
  item: (itemIndex: number) => `.${Dropdown.slotClassNames.itemsList} li:nth-child(${itemIndex})`,
}
github microsoft / fluent-ui-react / docs / src / examples / components / Dropdown / Types / DropdownExampleSearchMultiple.shorthand.steps.ts View on Github external
import { Dropdown, DropdownSearchInput } from '@fluentui/react'

const selectors = {
  toggleIndicator: `.${Dropdown.slotClassNames.toggleIndicator}`,
  input: `.${DropdownSearchInput.slotClassNames.input}`,
  item: (itemIndex: number) => `.${Dropdown.slotClassNames.itemsList} li:nth-child(${itemIndex})`,
  selectedItem: (itemIndex: number) =>
    `.${Dropdown.slotClassNames.selectedItems} span:nth-child(${itemIndex})`,
}

const config: ScreenerTestsConfig = {
  themes: ['teams', 'teamsDark', 'teamsHighContrast'],
  steps: [
    (builder, keys) =>
      builder
        .click(selectors.toggleIndicator)
        .click(selectors.item(2))
        .click(selectors.toggleIndicator)
        .click(selectors.item(2))
        .keys(selectors.input, keys.leftArrow)
github microsoft / fluent-ui-react / docs / src / examples / components / Popup / Usage / PopupExampleCloseButton.shorthand.steps.ts View on Github external
import { Dropdown, Button } from '@fluentui/react'

const selectors = {
  toggleIndicator: `.${Dropdown.slotClassNames.toggleIndicator}`,
  item: (itemIndex: number) => `.${Dropdown.slotClassNames.itemsList} li:nth-child(${itemIndex})`,
  popupTrigger: `.${Button.className}`,
}

const config: ScreenerTestsConfig = {
  themes: ['teams', 'teamsDark', 'teamsHighContrast'],
  steps: [
    builder =>
      builder
        .click(selectors.popupTrigger)
        .click(selectors.toggleIndicator)
        .hover(selectors.item(2))
        .snapshot('Prepares to select item out of popup.')
        .click(selectors.item(2))
        .snapshot('Item should be selected.'),
  ],