feat(layout): new layout selector with 3D volume rendering (#3923)
This commit is contained in:
1 parent
6f610b09e1
commit
617043fe0d
51 files changed
+829
-239
No files matched your search
@@ -0,0 +1,34 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Icon from '../Icon/Icon';
|
||||
|
||||
function LayoutPreset({ onSelection, title, icon, commandOptions, classNames }) {
|
||||
return (
|
||||
<div
|
||||
className={classNames}
|
||||
onClick={() => {
|
||||
onSelection(commandOptions);
|
||||
}}
|
||||
>
|
||||
<Icon
|
||||
name={icon}
|
||||
className="group-hover:text-primary-light"
|
||||
/>
|
||||
{title && <div className="font-inter text-sm text-white">{title}</div>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
LayoutPreset.defaultProps = {
|
||||
onSelection: () => {},
|
||||
};
|
||||
|
||||
LayoutPreset.propTypes = {
|
||||
onSelection: PropTypes.func.isRequired,
|
||||
title: PropTypes.string,
|
||||
icon: PropTypes.string.isRequired,
|
||||
commandOptions: PropTypes.object.isRequired,
|
||||
classNames: PropTypes.string,
|
||||
};
|
||||
|
||||
export default LayoutPreset;
|
||||
@@ -0,0 +1,2 @@
|
||||
import LayoutPreset from './LayoutPreset';
|
||||
export default LayoutPreset;
|
||||
Reference in new issue
Block a user