Skip to content

Commit

Permalink
WIP: minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dgdavid committed Mar 25, 2024
1 parent 5079764 commit fc54b1e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions web/src/components/core/ControlledPanels.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ const Options = ({ children, ...props }) => {
* @property {React.AriaAttributes["aria-controls"]} controls - A space-separated of one or more ID values
* referencing the elements whose contents or presence are controlled by the option.
* @property {boolean} isSelected - Whether the option is selected or not.
* @property {Omit<React.HTMLAttributes<HTMLInputElement>, "id" | "aria-controls">} props - Other props for the internal radio input
* @typedef {Omit<React.ComponentPropsWithoutRef<"input">, "aria-controls">} InputProps
*
* @param {React.PropsWithChildren<OptionProps>} props
* @param {React.PropsWithChildren<InputProps & OptionProps>} props
*/
const Option = ({ id, controls, isSelected, children, ...props }) => {
return (
Expand Down
9 changes: 5 additions & 4 deletions web/src/components/storage/DeviceSelectionDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
* find current contact information at www.suse.com.
*/

// @ts-check

import React, { useState } from "react";
import { sprintf } from "sprintf-js";
import { _ } from "~/i18n";
Expand Down Expand Up @@ -52,7 +54,7 @@ const Html = ({ children, ...props }) => (
* @param {function} props.onClose - Callback to execute when user closes the dialog
* @param {function} props.onConfirm - Callback to execute when user closes the dialog
*/
export default function DeviceSelectionDialog({ devices = [], isOpen = true, onClose, onConfirm, ...props }) {
export default function DeviceSelectionDialog({ devices, isOpen, onClose, onConfirm, ...props }) {
const [mode, setMode] = useState(SELECT_DISK_ID);
const [disks, setDisks] = useState([]);
const [vgDevices, setVgDevices] = useState([]);
Expand All @@ -62,7 +64,7 @@ export default function DeviceSelectionDialog({ devices = [], isOpen = true, onC

switch (mode) {
case SELECT_DISK_ID:
settings = { lvm: false, vgDevices };
settings = { lvm: false, devices: disks };
break;
case CREATE_LVM_ID:
settings = { lvm: true, vgDevices };
Expand All @@ -84,9 +86,8 @@ export default function DeviceSelectionDialog({ devices = [], isOpen = true, onC
<Popup
title={_("Device for installing the system")}
isOpen={isOpen}
variant="large"
className="large"
{...props}
style={{ minBlockSize: "70dvh" }}
>
<Panels className="stack">
<Panels.Options data-variant="buttons">
Expand Down

0 comments on commit fc54b1e

Please sign in to comment.