milestone 32: task-shaped configuration, file mode as a rendering, config status api
Gates / frontend (push) Successful in 1m22s
Gates / test (push) Successful in 1m54s
Gates / test-aarch64 (push) Successful in 7m57s
Gates / package (push) Successful in 5m29s
Gates / container (push) Successful in 10s
CI / gates (push) Successful in 32m51s
Gates / frontend (push) Successful in 1m22s
Gates / test (push) Successful in 1m54s
Gates / test-aarch64 (push) Successful in 7m57s
Gates / package (push) Successful in 5m29s
Gates / container (push) Successful in 10s
CI / gates (push) Successful in 32m51s
This commit is contained in:
+13
-2
@@ -25,6 +25,13 @@ interface Props {
|
||||
/** The tab list's accessible name. */
|
||||
label: string;
|
||||
tabs: readonly TabSpec[];
|
||||
/**
|
||||
* The open tab, when a caller owns the selection — the configuration pages
|
||||
* keep it in the URL. Omit both of these to let RAC hold the state, which
|
||||
* is what a tab set with no linkable identity wants.
|
||||
*/
|
||||
selectedKey?: string;
|
||||
onSelectionChange?: (key: string) => void;
|
||||
}
|
||||
|
||||
const styles = stylex.create({
|
||||
@@ -73,9 +80,13 @@ const styles = stylex.create({
|
||||
},
|
||||
});
|
||||
|
||||
export default function Tabs({ label, tabs }: Props) {
|
||||
export default function Tabs({ label, tabs, selectedKey, onSelectionChange }: Props) {
|
||||
return (
|
||||
<AriaTabs className={() => stylex.props(styles.root).className ?? ""}>
|
||||
<AriaTabs
|
||||
selectedKey={selectedKey}
|
||||
onSelectionChange={onSelectionChange === undefined ? undefined : (key) => onSelectionChange(String(key))}
|
||||
className={() => stylex.props(styles.root).className ?? ""}
|
||||
>
|
||||
<TabList aria-label={label} className={() => stylex.props(styles.list).className ?? ""}>
|
||||
{tabs.map((tab) => (
|
||||
<Tab
|
||||
|
||||
Reference in New Issue
Block a user