Skip to content

Commit

Permalink
use enum instaead of const
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolethoen committed May 16, 2019
1 parent 92ac1aa commit f5ec6ca
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Expand Up @@ -2,15 +2,15 @@ import * as React from 'react';
import styles from '@patternfly/patternfly/components/OptionsMenu/options-menu.css';
import { css, getModifier } from '@patternfly/react-styles';

export const OptionsMenuPosition = {
right: 'right',
left: 'left'
};
export enum OptionsMenuPosition {
right = 'right',
left = 'left'
}

export const OptionsMenuDirection = {
up: 'up',
down: 'down'
};
export enum OptionsMenuDirection {
up = 'up',
down = 'down'
}

export interface OptionsMenuProps extends React.HTMLProps<HTMLDivElement>{
/** Classes applied to root element of the Options menu */
Expand All @@ -28,9 +28,9 @@ export interface OptionsMenuProps extends React.HTMLProps<HTMLDivElement>{
/** Provides an accessible name for the Options menu */
ariaLabelMenu?: string;
/** Indicates where menu will be aligned horizontally */
position?: 'right' | 'left';
position?: 'right' | 'left';
/** Menu will open up or open down from the Options menu toggle */
direction?: 'up' | 'down';
direction?: 'up' | 'down';
}

export class OptionsMenu extends React.Component<OptionsMenuProps> {
Expand Down
Expand Up @@ -79,8 +79,8 @@ export class OptionsMenuDemo extends React.Component<React.HTMLProps<HTMLDivElem
onToggle={this.modifiedOnToggle} />,
isOpen: this.state.modifiedIsOpen,
isPlain: true,
direction: "up",
position: "right",
direction: OptionsMenuDirection.up,
position: OptionsMenuPosition.right,
};

return (
Expand Down

0 comments on commit f5ec6ca

Please sign in to comment.