diff --git a/packages/react-core/src/components/ApplicationLauncher/ApplicationLauncher.tsx b/packages/react-core/src/components/ApplicationLauncher/ApplicationLauncher.tsx index 5c7df5da3b2..a07b53673d4 100644 --- a/packages/react-core/src/components/ApplicationLauncher/ApplicationLauncher.tsx +++ b/packages/react-core/src/components/ApplicationLauncher/ApplicationLauncher.tsx @@ -14,13 +14,6 @@ export interface ApplicationLauncherProps extends React.HTMLProps {searchNoResultsText} @@ -221,7 +211,7 @@ export class ApplicationLauncher extends React.Component Link, - + Link, + Action - , - + , + Disabled Link - , - + , + Disabled Action - , - , - Separated Link, - + , + , + Separated Link, + Separated Action - + ]; describe('ApplicationLauncher', () => { test('regular', () => { - const view = mount(); + const view = mount(); expect(view).toMatchSnapshot(); }); test('right aligned', () => { - const view = mount(); + const view = mount(); expect(view).toMatchSnapshot(); }); test('dropup', () => { - const view = mount(); + const view = mount(); expect(view).toMatchSnapshot(); }); test('dropup + right aligned', () => { const view = mount( @@ -53,13 +53,13 @@ describe('ApplicationLauncher', () => { }); test('expanded', () => { - const view = mount(); + const view = mount(); expect(view).toMatchSnapshot(); }); test('custom icon', () => { const view = mount( - } /> + } /> ); expect(view).toMatchSnapshot(); }); diff --git a/packages/react-core/src/components/ApplicationLauncher/__tests__/__snapshots__/ApplicationLauncher.test.tsx.snap b/packages/react-core/src/components/ApplicationLauncher/__tests__/__snapshots__/ApplicationLauncher.test.tsx.snap index 47ad3e08329..d2692b49ad3 100644 --- a/packages/react-core/src/components/ApplicationLauncher/__tests__/__snapshots__/ApplicationLauncher.test.tsx.snap +++ b/packages/react-core/src/components/ApplicationLauncher/__tests__/__snapshots__/ApplicationLauncher.test.tsx.snap @@ -5,44 +5,43 @@ exports[`ApplicationLauncher custom icon 1`] = ` aria-label="Application launcher" className="" direction="down" - dropdownItems={ + favorites={Array []} + favoritesLabel="Favorites" + isDisabled={false} + isGrouped={false} + isOpen={true} + items={ Array [ - + Link - , - , + Action - , - , + Disabled Link - , - , + Disabled Action - , - , - + , + , + Separated Link - , - , + Separated Action - , + , ] } - favorites={Array []} - favoritesLabel="Favorites" - isDisabled={false} - isGrouped={false} - isOpen={true} - items={Array []} onSelect={[Function]} onToggle={[Function]} position="left" @@ -65,34 +64,34 @@ exports[`ApplicationLauncher custom icon 1`] = ` direction="down" dropdownItems={ Array [ - + Link - , - , + Action - , - , + Disabled Link - , - , + Disabled Action - , - , - + , + , + Separated Link - , - , + Separated Action - , + , ] } isGrouped={false} @@ -454,302 +453,386 @@ exports[`ApplicationLauncher custom icon 1`] = ` hidden={false} role="menu" > - - -
  • - - Link - -
  • -
    -
    - + + Link + + + + + + + - -
  • - -
  • -
    - - + + Action + + + + + +
    + - -
  • - - Disabled Link - -
  • -
    - - + + Disabled Link + + + + + +
    + - -
  • - -
  • -
    - - + + Disabled Action + + + + + +
    + - -
  • -
    -
  • -
    -
    - +
    + + + + + - -
  • - - Separated Link - -
  • -
    - - + + Separated Link + + + + + +
    + - -
  • - -
  • -
    - + + + + +
    @@ -762,44 +845,43 @@ exports[`ApplicationLauncher dropup + right aligned 1`] = ` aria-label="Application launcher" className="" direction="up" - dropdownItems={ + favorites={Array []} + favoritesLabel="Favorites" + isDisabled={false} + isGrouped={false} + isOpen={false} + items={ Array [ - + Link - , - , + Action - , - , + Disabled Link - , - , + Disabled Action - , - , - + , + , + Separated Link - , - , + Separated Action - , + , ] } - favorites={Array []} - favoritesLabel="Favorites" - isDisabled={false} - isGrouped={false} - isOpen={false} - items={Array []} onSelect={[Function]} onToggle={[Function]} position="right" @@ -821,34 +903,34 @@ exports[`ApplicationLauncher dropup + right aligned 1`] = ` direction="up" dropdownItems={ Array [ - + Link - , - , + Action - , - , + Disabled Link - , - , + Disabled Action - , - , - + , + , + Separated Link - , - , + Separated Action - , + , ] } isGrouped={false} @@ -1038,44 +1120,43 @@ exports[`ApplicationLauncher dropup 1`] = ` aria-label="Application launcher" className="" direction="up" - dropdownItems={ + favorites={Array []} + favoritesLabel="Favorites" + isDisabled={false} + isGrouped={false} + isOpen={false} + items={ Array [ - + Link - , - , + Action - , - , + Disabled Link - , - , + Disabled Action - , - , - + , + , + Separated Link - , - , + Separated Action - , + , ] } - favorites={Array []} - favoritesLabel="Favorites" - isDisabled={false} - isGrouped={false} - isOpen={false} - items={Array []} onSelect={[Function]} onToggle={[Function]} position="left" @@ -1097,34 +1178,34 @@ exports[`ApplicationLauncher dropup 1`] = ` direction="up" dropdownItems={ Array [ - + Link - , - , + Action - , - , + Disabled Link - , - , + Disabled Action - , - , - + , + , + Separated Link - , - , + Separated Action - , + , ] } isGrouped={false} @@ -1314,44 +1395,43 @@ exports[`ApplicationLauncher expanded 1`] = ` aria-label="Application launcher" className="" direction="down" - dropdownItems={ + favorites={Array []} + favoritesLabel="Favorites" + isDisabled={false} + isGrouped={false} + isOpen={true} + items={ Array [ - + Link - , - , + Action - , - , + Disabled Link - , - , + Disabled Action - , - , - + , + , + Separated Link - , - , + Separated Action - , + , ] } - favorites={Array []} - favoritesLabel="Favorites" - isDisabled={false} - isGrouped={false} - isOpen={true} - items={Array []} onSelect={[Function]} onToggle={[Function]} position="left" @@ -1373,34 +1453,34 @@ exports[`ApplicationLauncher expanded 1`] = ` direction="down" dropdownItems={ Array [ - + Link - , - , + Action - , - , + Disabled Link - , - , + Disabled Action - , - , - + , + , + Separated Link - , - , + Separated Action - , + , ] } isGrouped={false} @@ -1757,302 +1837,386 @@ exports[`ApplicationLauncher expanded 1`] = ` hidden={false} role="menu" > - - -
  • - - Link - -
  • -
    -
    - + + Link + + + + + + + - -
  • - -
  • -
    - - + + Action + + + + + +
    + - -
  • - - Disabled Link - -
  • -
    - - + + Disabled Link + + + + + +
    + - -
  • - -
  • -
    - - + + Disabled Action + + + + + +
    + - -
  • -
    -
  • -
    -
    - +
    + + + + + - -
  • - - Separated Link - -
  • -
    - - + + Separated Link + + + + + +
    + - -
  • - -
  • -
    - + + + + +
    @@ -2065,44 +2229,43 @@ exports[`ApplicationLauncher regular 1`] = ` aria-label="Application launcher" className="" direction="down" - dropdownItems={ + favorites={Array []} + favoritesLabel="Favorites" + isDisabled={false} + isGrouped={false} + isOpen={false} + items={ Array [ - + Link - , - , + Action - , - , + Disabled Link - , - , + Disabled Action - , - , - + , + , + Separated Link - , - , + Separated Action - , + , ] } - favorites={Array []} - favoritesLabel="Favorites" - isDisabled={false} - isGrouped={false} - isOpen={false} - items={Array []} onSelect={[Function]} onToggle={[Function]} position="left" @@ -2124,34 +2287,34 @@ exports[`ApplicationLauncher regular 1`] = ` direction="down" dropdownItems={ Array [ - + Link - , - , + Action - , - , + Disabled Link - , - , + Disabled Action - , - , - + , + , + Separated Link - , - , + Separated Action - , + , ] } isGrouped={false} @@ -2341,44 +2504,43 @@ exports[`ApplicationLauncher right aligned 1`] = ` aria-label="Application launcher" className="" direction="down" - dropdownItems={ + favorites={Array []} + favoritesLabel="Favorites" + isDisabled={false} + isGrouped={false} + isOpen={false} + items={ Array [ - + Link - , - , + Action - , - , + Disabled Link - , - , + Disabled Action - , - , - + , + , + Separated Link - , - , + Separated Action - , + , ] } - favorites={Array []} - favoritesLabel="Favorites" - isDisabled={false} - isGrouped={false} - isOpen={false} - items={Array []} onSelect={[Function]} onToggle={[Function]} position="right" @@ -2400,34 +2562,34 @@ exports[`ApplicationLauncher right aligned 1`] = ` direction="down" dropdownItems={ Array [ - + Link - , - , + Action - , - , + Disabled Link - , - , + Disabled Action - , - , - + , + , + Separated Link - , - , + Separated Action - , + , ] } isGrouped={false} diff --git a/packages/react-integration/demo-app-ts/src/components/demos/ApplicationLauncherDemo/ApplicationLauncherDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/ApplicationLauncherDemo/ApplicationLauncherDemo.tsx index 76293c0ff12..7ccd98e8bf6 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/ApplicationLauncherDemo/ApplicationLauncherDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/ApplicationLauncherDemo/ApplicationLauncherDemo.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { ApplicationLauncher, DropdownItem, Tooltip } from '@patternfly/react-core'; +import { ApplicationLauncher, ApplicationLauncherItem, Tooltip } from '@patternfly/react-core'; interface ApplicationLauncherState { isOpen: boolean; @@ -34,24 +34,24 @@ export class ApplicationLauncherDemo extends React.ComponentLaunch Application 1
    } key="1"> - + Application 1 - + , Launch Application 2
    } position="right" key="2"> - + Application 2 - + , Launch Application 3} position="right" key="3"> - + Application 3 - + , Application Unavailable At This Time} position="bottom" key="4"> - + Unavailable Application - + ]; return ( @@ -60,7 +60,7 @@ export class ApplicationLauncherDemo extends React.Component ); }