mirror of
https://github.com/wassname/talk.git
synced 2026-07-13 17:45:56 +08:00
Hide empty categories take 2
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import React from 'react';
|
||||
import styles from './Category.css';
|
||||
import {Slot, IfSlotIsNotEmpty} from 'plugin-api/beta/client/components';
|
||||
import {Slot} from 'plugin-api/beta/client/components';
|
||||
|
||||
const childFactory = (child) => <li className={styles.listItem} key={child.key}>{child}</li>;
|
||||
|
||||
const ViewingOptions = ({slot, title, data, asset, root}) => {
|
||||
return (
|
||||
<IfSlotIsNotEmpty slot={slot} className={styles.root}>
|
||||
<div className={styles.root}>
|
||||
<div className={styles.title}>{title}</div>
|
||||
<Slot
|
||||
fill={slot}
|
||||
@@ -16,7 +16,7 @@ const ViewingOptions = ({slot, title, data, asset, root}) => {
|
||||
data={data}
|
||||
queryData={{asset, root}}
|
||||
/>
|
||||
</IfSlotIsNotEmpty>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user