This repository was archived by the owner on Jun 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Add preset option to configuration #63
Closed
Tracked by
#2970
gbraad opened this issue
Jan 6, 2022
· 3 comments
· Fixed by crc-org/crc-react-components#22 or #111
Closed
Tracked by
#2970
Add preset option to configuration #63
gbraad opened this issue
Jan 6, 2022
· 3 comments
· Fixed by crc-org/crc-react-components#22 or #111
Comments
import React from 'react';
import { ToggleGroup, ToggleGroupItem } from '@patternfly/react-core';
class PresetSelectionExample extends React.Component {
constructor(props) {
super(props);
this.state = {
isPresetSelected: "podman" // from config
};
this.handlePresetSelectClick = (isSelected, event) => {
const id = event.currentTarget.id;
this.setState({ isPresetSelected: id });
};
}
render() {
const { isPresetSelected } = this.state;
return (
<ToggleGroup aria-label="Preset">
<ToggleGroupItem text="Podman" buttonId="podman"
isSelected={isPresetSelected === "podman"}
onChange={this.handlePresetSelectClick} />
<ToggleGroupItem text="OpenShift" buttonId="openshift"
isSelected={isPresetSelected === "openshift"}
onChange={this.handlePresetSelectClick} />
</ToggleGroup>
);
}
} |
Repository owner
moved this from In Progress
to Done
in Project planning
Jan 24, 2022
gbraad
added a commit
to gbraad-redhat/crc-tray-electron
that referenced
this issue
Jan 24, 2022
gbraad
added a commit
to gbraad-redhat/crc-tray-electron
that referenced
this issue
Jan 24, 2022
28 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
ToggleGroup
?The text was updated successfully, but these errors were encountered: