@elastic/eui
Version:
Elastic UI Component Library
53 lines (51 loc) • 2.64 kB
JavaScript
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import React, { forwardRef } from 'react';
import PropTypes from "prop-types";
import { EuiFlyout } from './flyout';
import { jsx as ___EmotionJSX } from "@emotion/react";
// If not omitted, the correct props don't show up in the docs prop table
export var EuiFlyoutResizable = /*#__PURE__*/forwardRef(function (props, ref) {
return ___EmotionJSX(EuiFlyout, _extends({
ref: ref
}, props, {
resizable: true
}));
});
EuiFlyoutResizable.propTypes = {
maxWidth: PropTypes.number,
/**
* Controls the way the session is managed for this flyout.
* - `start`: Creates a new flyout session. Use this for the main flyout.
* - `inherit`: Inherits an existing session if one is active, otherwise functions as a standard flyout.
* - `never`: Disregards session management and always functions as a standard flyout.
*
* When the `session` prop is undefined (not set), the flyout will automatically inherit from
* a parent flyout if it's nested inside one. Otherwise, it defaults to `never`.
*
* Check out [EuiFlyout session management](https://eui.elastic.co/docs/components/containers/flyout/#flyout-session-management)
* documentation to learn more.
* @default undefined (auto-inherit when nested, otherwise 'never')
*/
session: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.any.isRequired, PropTypes.any.isRequired]),
/**
* Optional Symbol to scope flyout history. Only flyouts that receive the same Symbol reference share Back button and history; omit to get a unique group per session.
* @default undefined (each session gets a unique key and does not share history)
*/
historyKey: PropTypes.any,
/**
* Callback fired when the flyout becomes active/visible, which may happen programmatically from history navigation.
*/
onActive: PropTypes.func,
/**
* The HTML element to render as the flyout container.
*/
as: PropTypes.any
};
EuiFlyoutResizable.displayName = 'EuiFlyoutResizable';