How to use @shopify/polaris - 1 common examples

To help you get started, we’ve selected a few @shopify/polaris 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 Anveio / mturk-engine / src / utils / databaseFilter.ts View on Github external
export interface HitDatabaseFilterOption {
  readonly value: StatusFilterType;
  readonly label: string;
}

export interface AppliedHitDatabaseFilter {
  readonly key: 'STATUS';
  readonly value: StatusFilterType;
  readonly label?: string;
}

export const availableFilters: HitDatabaseFilter[] = [
  {
    key: 'STATUS',
    label: 'Status',
    type: FilterType.Select,
    options: statusFilterTypeToLabel.reduce(
      (acc: HitDatabaseFilterOption[], cur: string, key: StatusFilterType) =>
        acc.concat([
          {
            label: cur,
            value: key
          }
        ]),
      []
    )
  }
];

export const appliedFiltersToStatusFilterTypeArray = (
  filters: AppliedHitDatabaseFilter[]
) =>

@shopify/polaris

Shopify’s admin product component library

SEE LICENSE IN LICENSE.md
Latest version published 4 days ago

Package Health Score

98 / 100
Full package analysis

Popular @shopify/polaris functions