Commit 56b6769e authored by Lyza Danger Gardner's avatar Lyza Danger Gardner Committed by Lyza Gardner

Replace use of button components with versions in `frontend-shared`

parent fba6751a
import {
IconButton,
LabeledButton,
LinkButton,
} from '@hypothesis/frontend-shared';
import {
PatternPage,
Pattern,
......@@ -5,12 +11,6 @@ import {
PatternExample,
} from '../shared/components/PatternPage';
import {
IconButton,
LabeledButton,
LinkButton,
} from '../../../src/shared/components/buttons';
export default function ButtonPatterns() {
return (
<PatternPage title="Buttons">
......
import {
IconButton,
LabeledButton,
LinkButton,
} from '@hypothesis/frontend-shared';
import {
PatternPage,
Pattern,
......@@ -5,12 +11,6 @@ import {
PatternExample,
} from '../PatternPage';
import {
IconButton,
LabeledButton,
LinkButton,
} from '../../../../../src/shared/components/buttons';
export default function SharedButtonPatterns() {
return (
<PatternPage title="Buttons">
......
import { LabeledButton } from '@hypothesis/frontend-shared';
import { useEffect, useRef, useState } from 'preact/hooks';
import classnames from 'classnames';
import { createSidebarConfig } from '../config/sidebar';
import { LabeledButton } from '../../shared/components/buttons';
/**
* @typedef NotebookIframeProps
* @prop {Record<string, any>} config
......
import Dialog from './Dialog';
import { LabeledButton } from '@hypothesis/frontend-shared';
import { LabeledButton } from './buttons';
import Dialog from './Dialog';
/**
* @typedef ConfirmDialogProps
......
import { useElementShouldClose } from '@hypothesis/frontend-shared';
import {
LabeledButton,
useElementShouldClose,
} from '@hypothesis/frontend-shared';
import { Fragment } from 'preact';
import { useEffect, useLayoutEffect, useRef, useState } from 'preact/hooks';
import classNames from 'classnames';
import { LabeledButton } from './buttons';
let idCounter = 0;
/**
......
import { useStoreProxy } from '../../store/use-store';
import { IconButton } from '@hypothesis/frontend-shared';
import { confirm } from '../../../shared/prompts';
import {
sharingEnabled,
annotationSharingLink,
} from '../../helpers/annotation-sharing';
import { isPrivate, permits } from '../../helpers/permissions';
import { withServices } from '../../service-context';
import { IconButton } from '../../../shared/components/buttons';
import { confirm } from '../../../shared/prompts';
import { useStoreProxy } from '../../store/use-store';
import AnnotationShareControl from './AnnotationShareControl';
......
import { LabeledButton } from '@hypothesis/frontend-shared';
import { useState } from 'preact/hooks';
import { useStoreProxy } from '../../store/use-store';
......@@ -5,8 +6,6 @@ import { isHidden } from '../../helpers/annotation-metadata';
import { withServices } from '../../service-context';
import { applyTheme } from '../../helpers/theme';
import { LabeledButton } from '../../../shared/components/buttons';
import Excerpt from '../Excerpt';
import MarkdownView from '../MarkdownView';
import TagList from '../TagList';
......
import { SvgIcon } from '@hypothesis/frontend-shared';
import { SvgIcon, LinkButton } from '@hypothesis/frontend-shared';
import { useMemo } from 'preact/hooks';
import { withServices } from '../../service-context';
......@@ -13,8 +13,6 @@ import {
import { annotationDisplayName } from '../../helpers/annotation-user';
import { isPrivate } from '../../helpers/permissions';
import { LinkButton } from '../../../shared/components/buttons';
import AnnotationDocumentInfo from './AnnotationDocumentInfo';
import AnnotationShareInfo from './AnnotationShareInfo';
import AnnotationTimestamps from './AnnotationTimestamps';
......
import { SvgIcon } from '@hypothesis/frontend-shared';
import { LabeledButton, SvgIcon } from '@hypothesis/frontend-shared';
import { useStoreProxy } from '../../store/use-store';
import { isNew, isReply } from '../../helpers/annotation-metadata';
......@@ -6,8 +6,6 @@ import { isShared } from '../../helpers/permissions';
import { withServices } from '../../service-context';
import { applyTheme } from '../../helpers/theme';
import { LabeledButton } from '../../../shared/components/buttons';
import Menu from '../Menu';
import MenuItem from '../MenuItem';
......
import { LinkButton } from '../../../shared/components/buttons';
import { LinkButton } from '@hypothesis/frontend-shared';
/**
* @typedef AnnotationReplyToggleProps
......
import { SvgIcon, useElementShouldClose } from '@hypothesis/frontend-shared';
import {
IconButton,
SvgIcon,
useElementShouldClose,
} from '@hypothesis/frontend-shared';
import { useEffect, useRef, useState } from 'preact/hooks';
import { isShareableURI } from '../../helpers/annotation-sharing';
......@@ -7,8 +11,6 @@ import { isPrivate } from '../../helpers/permissions';
import { withServices } from '../../service-context';
import { isIOS } from '../../../shared/user-agent';
import { IconButton } from '../../../shared/components/buttons';
import ShareLinks from '../ShareLinks';
/**
......
import { LinkButton } from '@hypothesis/frontend-shared';
import classnames from 'classnames';
import { useCallback, useLayoutEffect, useRef, useState } from 'preact/hooks';
......@@ -5,8 +6,6 @@ import observeElementSize from '../util/observe-element-size';
import { withServices } from '../service-context';
import { applyTheme } from '../helpers/theme';
import { LinkButton } from '../../shared/components/buttons';
/**
* @typedef InlineControlsProps
* @prop {boolean} isCollapsed
......
import { LabeledButton } from '@hypothesis/frontend-shared';
import { useMemo } from 'preact/hooks';
import { countVisible } from '../helpers/thread';
import { LabeledButton } from '../../shared/components/buttons';
import { useStoreProxy } from '../store/use-store';
import useRootThread from './hooks/use-root-thread';
import { useStoreProxy } from '../store/use-store';
/**
* @typedef {import('../helpers/build-thread').Thread} Thread
......
import { SvgIcon } from '@hypothesis/frontend-shared';
import { LinkButton, SvgIcon } from '@hypothesis/frontend-shared';
import { withServices } from '../service-context';
import { LinkButton } from '../../shared/components/buttons';
/** @typedef {import('../services/service-url').ServiceUrlGetter} ServiceUrlGetter */
/**
......
import { LabeledButton } from '@hypothesis/frontend-shared';
import { useStoreProxy } from '../store/use-store';
import { LabeledButton } from '../../shared/components/buttons';
import SidebarPanel from './SidebarPanel';
/**
......
import { IconButton } from '@hypothesis/frontend-shared';
import { useEffect, useLayoutEffect, useRef, useState } from 'preact/hooks';
import scrollIntoView from 'scroll-into-view';
import { IconButton } from '../../shared/components/buttons';
import { ResultSizeError } from '../search-client';
import { withServices } from '../service-context';
import { useStoreProxy } from '../store/use-store';
......
import { pageNumberOptions } from '../util/pagination';
import { LabeledButton } from '@hypothesis/frontend-shared';
import { LabeledButton } from '../../shared/components/buttons';
import { pageNumberOptions } from '../util/pagination';
/**
* @typedef PaginationNavigationProps
......
import { SvgIcon } from '@hypothesis/frontend-shared';
import { LabeledButton } from '../../shared/components/buttons';
import { LabeledButton, SvgIcon } from '@hypothesis/frontend-shared';
/**
* @typedef PanelProps
......
import { IconButton } from '@hypothesis/frontend-shared';
import classnames from 'classnames';
import { useRef, useState } from 'preact/hooks';
import { useStoreProxy } from '../store/use-store';
import { IconButton } from '../../shared/components/buttons';
import Spinner from './Spinner';
/**
......
import { LabeledButton, SvgIcon } from '@hypothesis/frontend-shared';
import classnames from 'classnames';
import { SvgIcon } from '@hypothesis/frontend-shared';
import { applyTheme } from '../helpers/theme';
import { useStoreProxy } from '../store/use-store';
import { withServices } from '../service-context';
import { LabeledButton } from '../../shared/components/buttons';
/**
* @typedef {import('../../types/config').MergedConfig} MergedConfig
* @typedef {import('../../types/sidebar').TabName} TabName
......
import { SvgIcon } from '@hypothesis/frontend-shared';
import { IconButton, SvgIcon } from '@hypothesis/frontend-shared';
import { useStoreProxy } from '../store/use-store';
import { pageSharingLink } from '../helpers/annotation-sharing';
......@@ -6,8 +6,6 @@ import { copyText } from '../util/copy-to-clipboard';
import { withServices } from '../service-context';
import { notNull } from '../util/typing';
import { IconButton } from '../../shared/components/buttons';
import ShareLinks from './ShareLinks';
import SidebarPanel from './SidebarPanel';
import Spinner from './Spinner';
......
import { useStoreProxy } from '../store/use-store';
import { LabeledButton } from '@hypothesis/frontend-shared';
import { LabeledButton } from '../../shared/components/buttons';
import { useStoreProxy } from '../store/use-store';
import Panel from './Panel';
......
import { IconButton, LabeledButton } from '@hypothesis/frontend-shared';
import classnames from 'classnames';
import { useCallback, useMemo } from 'preact/hooks';
......@@ -5,8 +6,6 @@ import { useStoreProxy } from '../store/use-store';
import { withServices } from '../service-context';
import { countHidden, countVisible } from '../helpers/thread';
import { IconButton, LabeledButton } from '../../shared/components/buttons';
import Annotation from './Annotation';
import ModerationBanner from './ModerationBanner';
......
import { IconButton, LinkButton } from '@hypothesis/frontend-shared';
import bridgeEvents from '../../shared/bridge-events';
import serviceConfig from '../config/service-config';
import { useStoreProxy } from '../store/use-store';
......@@ -5,8 +7,6 @@ import isThirdPartyService from '../helpers/is-third-party-service';
import { withServices } from '../service-context';
import { applyTheme } from '../helpers/theme';
import { IconButton, LinkButton } from '../../shared/components/buttons';
import GroupList from './GroupList';
import SearchInput from './SearchInput';
import SortMenu from './SortMenu';
......
import { LabeledButton } from '@hypothesis/frontend-shared';
import { copyText } from '../util/copy-to-clipboard';
import { withServices } from '../service-context';
import { LabeledButton } from '../../shared/components/buttons';
/**
* @typedef VersionInfoProps
* @prop {import('../helpers/version-data').default} versionData - Object with version information
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment