Skip to content

Commit

Permalink
Add typescript defs to flags
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardwang committed Mar 10, 2021
1 parent 2f633ea commit 5088d75
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
12 changes: 0 additions & 12 deletions packages/design-system/src/components/flags.js

This file was deleted.

17 changes: 17 additions & 0 deletions packages/design-system/src/components/flags.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
type errorPlacementValue = 'top' | 'bottom';
interface flagsType {
ERROR_PLACEMENT_DEFAULT: errorPlacementValue
}

// featureFlags.js
const flags: flagsType = {
ERROR_PLACEMENT_DEFAULT: 'top',
};

export function errorPlacementDefault(): errorPlacementValue {
return flags.ERROR_PLACEMENT_DEFAULT;
}

export function setErrorPlacementDefault(value: errorPlacementValue): void {
flags.ERROR_PLACEMENT_DEFAULT = value;
}

0 comments on commit 5088d75

Please sign in to comment.