@cloudtower/eagle 0.27.3-gobackbutton → 0.27.3-gobackbutton1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -2,7 +2,7 @@ import { Button as Button$1, Checkbox as Checkbox$1, DatePicker, Select as Selec
2
2
  export { Col, Row } from 'antd';
3
3
  import * as React from 'react';
4
4
  import React__default, { useState, useMemo, useRef, useLayoutEffect, useEffect, Fragment, useCallback, forwardRef, createContext, memo, useImperativeHandle, useContext } from 'react';
5
- import { XmarkRemove24SecondaryIcon, InfoICircleFill16SecondaryIcon, XmarkFailedSeriousWarningFill16RedIcon, NoticeAttention16YellowIcon, InfoICircleFill16BlueIcon, CheckmarkDoneSuccessCircleFill16GreenIcon, FocusIndicator16BlueIcon, ClockIcon, CloseIcon, ArrowRightGrayIcon, ArrowChevronUp16SecondaryIcon, ArrowChevronDown16SecondaryIcon, CheckmarkDoneSuccessCorrect16SecondaryIcon, ArrowChevronLeftSmall16BoldBlueIcon, ArrowChevronDownSmall16SecondaryIcon, ArrowChevronDownSmall16BlueIcon, Loading8GradientBlueIcon, ArrowChevronUp16BoldSecondaryIcon, PlusAddCreateNew16SecondaryIcon, HandlePoint816SecondaryIcon, HandlePoint816BlueIcon, XmarkRemove16SecondaryIcon, XmarkRemove16RegularRedIcon, CheckmarkDoneSuccessCorrect16BlueIcon, XmarkRemoveSmall16RegularInheritIcon } from '@cloudtower/icons-react';
5
+ import { XmarkRemove24SecondaryIcon, InfoICircleFill16SecondaryIcon, XmarkFailedSeriousWarningFill16RedIcon, NoticeAttention16YellowIcon, InfoICircleFill16BlueIcon, CheckmarkDoneSuccessCircleFill16GreenIcon, FocusIndicator16BlueIcon, ClockIcon, CloseIcon, ArrowRightGrayIcon, ArrowChevronUp16SecondaryIcon, ArrowChevronDown16SecondaryIcon, CheckmarkDoneSuccessCorrect16SecondaryIcon, ArrowChevronLeftSmall16BoldBlueIcon, ArrowChevronDownSmall16SecondaryIcon, ArrowChevronDownSmall16BlueIcon, Loading8GradientBlueIcon, ArrowChevronUp16BoldSecondaryIcon, PlusAddCreateNew16SecondaryIcon, HandlePoint816SecondaryIcon, HandlePoint816BlueIcon, XmarkRemove16SecondaryIcon, XmarkRemove16RegularRedIcon, CheckmarkDoneSuccessCorrect16BlueIcon, XmarkRemoveSmall16RegularInheritIcon, ArrowChevronLeft16BoldTertiaryIcon, ArrowChevronLeft16BoldBlueIcon } from '@cloudtower/icons-react';
6
6
  import cs from 'classnames';
7
7
  import { styled } from 'linaria/react';
8
8
  import _, { debounce, uniqBy, groupBy, sortBy, toPairs } from 'lodash';
@@ -6912,6 +6912,41 @@ const Truncate = props => {
6912
6912
  }, Text);
6913
6913
  };
6914
6914
 
6915
+ const GobackButtonStyle = "gmyahx3";
6916
+ const GobackButton = props => {
6917
+ const {
6918
+ onClick,
6919
+ path,
6920
+ index,
6921
+ title,
6922
+ history
6923
+ } = props;
6924
+ const goto = () => {
6925
+ if (path) {
6926
+ history.push(path);
6927
+ return;
6928
+ }
6929
+ if (index) {
6930
+ history.go(index);
6931
+ return;
6932
+ }
6933
+ if (onClick) {
6934
+ onClick == null ? void 0 : onClick();
6935
+ return;
6936
+ }
6937
+ history.goBack();
6938
+ };
6939
+ return /* @__PURE__ */React__default.createElement("span", {
6940
+ className: cx(GobackButtonStyle)
6941
+ }, /* @__PURE__ */React__default.createElement(Icon, {
6942
+ src: ArrowChevronLeft16BoldTertiaryIcon,
6943
+ hoverSrc: ArrowChevronLeft16BoldBlueIcon,
6944
+ onClick: goto
6945
+ }, /* @__PURE__ */React__default.createElement("span", {
6946
+ className: cx(Typo.Label.l4_bold, "link-text")
6947
+ }, title)));
6948
+ };
6949
+
6915
6950
  function getAntdKit() {
6916
6951
  const kit = {
6917
6952
  loading: Loading,
@@ -7006,6 +7041,7 @@ function getAntdKit() {
7006
7041
  card: Card,
7007
7042
  overflowTooltip: OverflowTooltip,
7008
7043
  I18nNameTag,
7044
+ GoBackButton: GobackButton,
7009
7045
  SwitchWithText,
7010
7046
  CronPlan,
7011
7047
  NamesTooltip,