-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
web: update the split button UI to more gracefully handle border mism…
…atch (#5531)
- Loading branch information
Showing
5 changed files
with
90 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import React from "react" | ||
import { MemoryRouter } from "react-router" | ||
import Features, { FeaturesTestProvider, Flag } from "./feature" | ||
import { OverviewTableBulkActions } from "./OverviewTableBulkActions" | ||
import { ResourceSelectionProvider } from "./ResourceSelectionContext" | ||
import { disableButton } from "./testdata" | ||
|
||
type UIButton = Proto.v1alpha1UIButton | ||
type UIInputSpec = Proto.v1alpha1UIInputSpec | ||
type UITextInputSpec = Proto.v1alpha1UITextInputSpec | ||
type UIInputStatus = Proto.v1alpha1UIInputStatus | ||
|
||
export default { | ||
title: "New UI/Overview/OverviewTableBulkActions", | ||
decorators: [ | ||
(Story: any) => { | ||
const features = new Features({ | ||
[Flag.Labels]: true, | ||
[Flag.DisableResources]: true, | ||
}) | ||
return ( | ||
<MemoryRouter initialEntries={["/"]}> | ||
<FeaturesTestProvider value={features}> | ||
<ResourceSelectionProvider initialValuesForTesting={["fe", "api"]}> | ||
<Story /> | ||
</ResourceSelectionProvider> | ||
</FeaturesTestProvider> | ||
</MemoryRouter> | ||
) | ||
}, | ||
], | ||
} | ||
|
||
export const BulkActionsAllEnabled = () => { | ||
const a = disableButton("fe", true) | ||
const b = disableButton("api", true) | ||
return <OverviewTableBulkActions uiButtons={[a, b]} /> | ||
} | ||
|
||
export const BulkActionsAllDisabled = () => { | ||
const a = disableButton("fe", false) | ||
const b = disableButton("api", false) | ||
return <OverviewTableBulkActions uiButtons={[a, b]} /> | ||
} | ||
|
||
export const BulkActionsPartial = () => { | ||
const a = disableButton("fe", false) | ||
const b = disableButton("api", true) | ||
return <OverviewTableBulkActions uiButtons={[a, b]} /> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters