- (props: SpectrumMenuItemProps) {
styles,
'spectrum-Menu-itemGrid'
)
- }
+ }
slots={{
text: styles['spectrum-Menu-itemLabel'],
end: styles['spectrum-Menu-end'],
icon: styles['spectrum-Menu-icon'],
description: styles['spectrum-Menu-description'],
- keyboard: styles['spectrum-Menu-keyboard']}}>
+ keyboard: styles['spectrum-Menu-keyboard']
+ }}>
{!Array.isArray(rendered) && (
{rendered}
@@ -91,7 +96,7 @@ export function MenuItem(props: SpectrumMenuItemProps) {
{Array.isArray(rendered) && rendered}
{isSelected &&
(props: SpectrumMenuItemProps) {
} />
}
-
+
);
}
diff --git a/packages/@react-spectrum/menu/src/MenuSection.tsx b/packages/@react-spectrum/menu/src/MenuSection.tsx
new file mode 100644
index 00000000000..96a2be195dc
--- /dev/null
+++ b/packages/@react-spectrum/menu/src/MenuSection.tsx
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2020 Adobe. All rights reserved.
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License. You may obtain a copy
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
+ * OF ANY KIND, either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+
+import {classNames} from '@react-spectrum/utils';
+import {MenuItem} from './MenuItem';
+import {Node} from '@react-stately/collections';
+import React, {Fragment} from 'react';
+import styles from '@adobe/spectrum-css-temp/components/menu/vars.css';
+import {TreeState} from '@react-stately/tree';
+import {useMenuSection} from '@react-aria/menu';
+import {useSeparator} from '@react-aria/separator';
+
+interface MenuSectionProps