diff --git a/package-lock.json b/package-lock.json index e992f1370..7132abd67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11956,11 +11956,6 @@ "through2": "^4.0.0" } }, - "github-buttons": { - "version": "2.24.0", - "resolved": "https://registry.npmjs.org/github-buttons/-/github-buttons-2.24.0.tgz", - "integrity": "sha512-dHpEno4S2JHjsEKPLSTGDTV50q1d08n3H7VDfNNA1m8cz5DMqLCZDdKWQxy4zyvd6M3tKvlVYLs+/H0BF3DggA==" - }, "github-slugger": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-1.5.0.tgz", @@ -19694,14 +19689,6 @@ "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.0.tgz", "integrity": "sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==" }, - "react-github-btn": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/react-github-btn/-/react-github-btn-1.4.0.tgz", - "integrity": "sha512-lV4FYClAfjWnBfv0iNlJUGhamDgIq6TayD0kPZED6VzHWdpcHmPfsYOZ/CFwLfPv4Zp+F4m8QKTj0oy2HjiGXg==", - "requires": { - "github-buttons": "^2.22.0" - } - }, "react-input-autosize": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/react-input-autosize/-/react-input-autosize-3.0.0.tgz", diff --git a/package.json b/package.json index bccd87b9d..d1a8b26eb 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,6 @@ "@gravity-ui/i18n": "^1.0.0", "bem-cn-lite": "^4.0.0", "lodash": "^4.17.21", - "react-github-btn": "^1.4.0", "react-player": "^2.9.0", "react-slick": "^0.28.1", "react-spring": "^9.3.0", diff --git a/src/containers/PageConstructor/__stories__/data.json b/src/containers/PageConstructor/__stories__/data.json index aebbfb179..a72c01a2d 100644 --- a/src/containers/PageConstructor/__stories__/data.json +++ b/src/containers/PageConstructor/__stories__/data.json @@ -308,12 +308,6 @@ } ], "rightItems": [ - { - "type": "github-stars", - "text": "Star", - "label": "Star @gravity-ui/page-constructor on GitHub", - "url": "https://github.com/gravity-ui/page-constructor" - }, { "type": "link", "text": "Link", diff --git a/src/models/navigation.ts b/src/models/navigation.ts index 030c5a61c..b4dda74e7 100644 --- a/src/models/navigation.ts +++ b/src/models/navigation.ts @@ -6,7 +6,6 @@ export enum NavigationItemType { Dropdown = 'dropdown', Button = 'button', Social = 'social', - GithubStars = 'github-stars', } export interface NavigationItemBase { @@ -15,12 +14,6 @@ export interface NavigationItemBase { url?: string; } -export interface NavigationGithubButton extends Omit { - type: NavigationItemType.GithubStars; - url: string; - label?: string; -} - export interface NavigationLinkItem extends Omit { type: NavigationItemType.Link; url: string; @@ -46,15 +39,13 @@ export interface NavigationSocialItem extends Omit { export type NavigationItemModel = | NavigationLinkItem | NavigationButtonItem - | NavigationDropdownItem - | NavigationGithubButton; + | NavigationDropdownItem; export type NavigationItemData = | NavigationLinkItem | NavigationButtonItem | NavigationSocialItem - | DropdownItemData - | NavigationGithubButton; + | DropdownItemData; export type DropdownItemData = Omit; diff --git a/src/navigation/components/NavigationItem/NavigationItem.tsx b/src/navigation/components/NavigationItem/NavigationItem.tsx index 84da91bf7..8fd6e66dd 100644 --- a/src/navigation/components/NavigationItem/NavigationItem.tsx +++ b/src/navigation/components/NavigationItem/NavigationItem.tsx @@ -7,7 +7,6 @@ import {BlockIdContext} from '../../../context/blockIdContext'; import {NavigationButton} from './components/NavigationButton/NavigationButton'; import {NavigationDropdown} from './components/NavigationDropdown/NavigationDropdown'; import {NavigationLink} from './components/NavigationLink/NavigationLink'; -import {GithubStars} from './components/GithubStars/GithubStars'; const ANALYTICS_ID = 'navigation'; @@ -25,7 +24,6 @@ const NavigationItemsMap: Record> = [NavigationItemType.Social]: SocialIcon, [NavigationItemType.Dropdown]: NavigationDropdown, [NavigationItemType.Link]: NavigationLink, - [NavigationItemType.GithubStars]: GithubStars, }; const NavigationItem: React.FC = ({data, className, ...props}) => { @@ -42,7 +40,7 @@ const NavigationItem: React.FC = ({data, className, ...prop return ( - ; + ); }; diff --git a/src/navigation/components/NavigationItem/components/GithubStars/GithubStars.scss b/src/navigation/components/NavigationItem/components/GithubStars/GithubStars.scss deleted file mode 100644 index 2db6fbf01..000000000 --- a/src/navigation/components/NavigationItem/components/GithubStars/GithubStars.scss +++ /dev/null @@ -1,18 +0,0 @@ -@import '../../../../../../styles/variables'; -@import '../../mixins'; - -$block: '.#{$ns}github-stars'; - -#{$block} { - @include navigation-item-display(); - - display: flex; - align-items: center; - height: 100%; - - span { - display: flex; - flex-direction: column; - justify-content: center; - } -} diff --git a/src/navigation/components/NavigationItem/components/GithubStars/GithubStars.tsx b/src/navigation/components/NavigationItem/components/GithubStars/GithubStars.tsx deleted file mode 100644 index 050a134f7..000000000 --- a/src/navigation/components/NavigationItem/components/GithubStars/GithubStars.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react'; -import GitHubButton from 'react-github-btn'; - -import {block} from '../../../../../utils'; - -import {NavigationItemProps} from '../../NavigationItem'; -import {NavigationGithubButton} from '../../../../../models'; - -import './GithubStars.scss'; - -const b = block('github-stars'); - -type NavigationGithubButtonProps = NavigationItemProps & NavigationGithubButton; - -export const GithubStars = ({text, url, className, label}: NavigationGithubButtonProps) => ( -
- - {text} - -
-);