Skip to content

Commit

Permalink
rename button
Browse files Browse the repository at this point in the history
  • Loading branch information
fiskus committed Feb 1, 2023
1 parent bb238e7 commit 8841a2d
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 25 deletions.
File renamed without changes.
1 change: 0 additions & 1 deletion catalog/app/components/Buttons/index.ts

This file was deleted.

8 changes: 4 additions & 4 deletions catalog/app/components/FileEditor/Controls.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react'
import * as M from '@material-ui/core'

import * as Buttons from 'components/Buttons'
import ButtonIconized from 'components/ButtonIconized'
import { EditorState } from './State'

interface AddFileButtonProps {
Expand Down Expand Up @@ -52,7 +52,7 @@ export function Controls({
if (!editing)
return (
<>
<Buttons.Iconized
<ButtonIconized
className={className}
disabled={disabled}
icon="edit"
Expand All @@ -72,8 +72,8 @@ export function Controls({
)
return (
<M.ButtonGroup disabled={disabled} className={className} size="small">
<Buttons.Iconized icon="undo" onClick={onCancel} label="Cancel" />
<Buttons.Iconized
<ButtonIconized icon="undo" onClick={onCancel} label="Cancel" />
<ButtonIconized
color="primary"
icon="save"
label="Save"
Expand Down
4 changes: 2 additions & 2 deletions catalog/app/components/SearchResults/SearchResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Link } from 'react-router-dom'
import * as M from '@material-ui/core'

import { copyWithoutSpaces } from 'components/BreadCrumbs'
import * as Buttons from 'components/Buttons'
import ButtonIconized from 'components/ButtonIconized'
import JsonDisplay from 'components/JsonDisplay'
import Pagination from 'components/Pagination2'
import * as Preview from 'components/Preview'
Expand Down Expand Up @@ -94,7 +94,7 @@ function ObjectHeader({ handle, showBucket, downloadable = false, expanded, onTo
<Heading display="flex" alignItems="center" mb="0 !important">
<ObjectCrumbs {...{ handle, showBucket }} />
<M.Box flexGrow={1} />
<Buttons.Iconized
<ButtonIconized
label={expanded ? 'Collapse' : 'Expand'}
icon={expanded ? 'unfold_less' : 'unfold_more'}
rotate={expanded}
Expand Down
4 changes: 2 additions & 2 deletions catalog/app/containers/Bucket/Download.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from 'react'
import cfg from 'constants/config'
import mkStorage from 'utils/storage'

import * as Buttons from 'components/Buttons'
import ButtonIconized from 'components/ButtonIconized'

import * as FileView from './FileView'

Expand All @@ -19,7 +19,7 @@ export function DownloadButton({ className, label, onClick, path }: DownloadButt

if (cfg.desktop) {
return (
<Buttons.Iconized
<ButtonIconized
className={className}
label={label}
icon="archive"
Expand Down
4 changes: 2 additions & 2 deletions catalog/app/containers/Bucket/File.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Link, useHistory } from 'react-router-dom'
import * as M from '@material-ui/core'

import { Crumb, copyWithoutSpaces, render as renderCrumbs } from 'components/BreadCrumbs'
import * as Buttons from 'components/Buttons'
import ButtonIconized from 'components/ButtonIconized'
import * as FileEditor from 'components/FileEditor'
import Message from 'components/Message'
import * as Preview from 'components/Preview'
Expand Down Expand Up @@ -490,7 +490,7 @@ export default function File({
onSave={handleEditorSave}
/>
)}
<Buttons.Iconized
<ButtonIconized
className={classes.button}
icon={isBookmarked ? 'turned_in' : 'turned_in_not'}
label={isBookmarked ? 'Remove from bookmarks' : 'Add to bookmarks'}
Expand Down
11 changes: 3 additions & 8 deletions catalog/app/containers/Bucket/FileView.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as redux from 'react-redux'
import * as M from '@material-ui/core'

// import Message from 'components/Message'
import * as Buttons from 'components/Buttons'
import ButtonIconized from 'components/ButtonIconized'
import SelectDropdown from 'components/SelectDropdown'
import cfg from 'constants/config'
import { tokens as tokensSelector } from 'containers/Auth/selectors'
Expand All @@ -16,7 +16,7 @@ export * from './Meta'

export function DownloadButton({ className, handle }) {
return AWS.Signer.withDownloadUrl(handle, (url) => (
<Buttons.Iconized
<ButtonIconized
className={className}
href={url}
download
Expand Down Expand Up @@ -60,12 +60,7 @@ export function ZipDownloadForm({ className, suffix, label, newTab = false }) {
style={{ flexShrink: 0 }}
>
<input type="hidden" name="token" value={token} />
<Buttons.Iconized
className={className}
label={label}
icon="archive"
type="submit"
/>
<ButtonIconized className={className} label={label} icon="archive" type="submit" />
</form>
)
}
Expand Down
4 changes: 2 additions & 2 deletions catalog/app/containers/Bucket/PackageTree/PackageTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import * as M from '@material-ui/core'
import * as Lab from '@material-ui/lab'

import { Crumb, copyWithoutSpaces, render as renderCrumbs } from 'components/BreadCrumbs'
import * as Buttons from 'components/Buttons'
import ButtonIconized from 'components/ButtonIconized'
import * as FileEditor from 'components/FileEditor'
import Message from 'components/Message'
import Placeholder from 'components/Placeholder'
Expand Down Expand Up @@ -671,7 +671,7 @@ function FileDisplay({
size={size}
/>
{isEditable && (
<Buttons.Iconized
<ButtonIconized
className={classes.button}
icon="edit"
label="Edit"
Expand Down
4 changes: 2 additions & 2 deletions catalog/app/containers/Bucket/Successors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react'
import * as M from '@material-ui/core'
import * as Lab from '@material-ui/lab'

import * as Buttons from 'components/Buttons'
import ButtonIconized from 'components/ButtonIconized'
import SelectDropdown from 'components/SelectDropdown'
import { docs } from 'constants/urls'
import * as AWS from 'utils/AWS'
Expand Down Expand Up @@ -245,7 +245,7 @@ export function Button({ bucket, className, children, onChange }: ButtonProps) {

return (
<>
<Buttons.Iconized
<ButtonIconized
aria-haspopup
className={className}
icon="exit_to_app"
Expand Down
4 changes: 2 additions & 2 deletions catalog/app/containers/Bucket/Summarize.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as React from 'react'
import * as M from '@material-ui/core'

import { copyWithoutSpaces } from 'components/BreadCrumbs'
import * as Buttons from 'components/Buttons'
import ButtonIconized from 'components/ButtonIconized'
import Markdown from 'components/Markdown'
import * as Preview from 'components/Preview'
import type { Type as SummaryFileTypes } from 'components/Preview/loaders/summarize'
Expand Down Expand Up @@ -127,7 +127,7 @@ export function Section({
<div className={classes.heading}>
<div className={classes.headingText}>{heading}</div>
{onToggle && (
<Buttons.Iconized
<ButtonIconized
className={classes.toggle}
label={expanded ? 'Collapse' : 'Expand'}
icon={expanded ? 'unfold_less' : 'unfold_more'}
Expand Down

0 comments on commit 8841a2d

Please sign in to comment.