Skip to content

Commit

Permalink
feat: Migrate cozy-ui deprecated Button to Buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
zatteo authored and Ldoppea committed Jan 30, 2025
1 parent 6aedf94 commit deb2d70
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/modules/filelist/LoadMore.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import cx from 'classnames'
import PropTypes from 'prop-types'
import React from 'react'

import Buttons from 'cozy-ui/transpiled/react/Buttons'
import Spinner from 'cozy-ui/transpiled/react/Spinner'
import Button from 'cozy-ui/transpiled/react/deprecated/Button'
import { TableRow } from 'cozy-ui/transpiled/react/deprecated/Table'
import { translate } from 'cozy-ui/transpiled/react/providers/I18n'

Expand All @@ -13,8 +13,8 @@ const LoadMore = ({ onClick, isLoading, text }) => (
<TableRow
className={cx(styles['fil-content-row'], styles['fil-content-row--center'])}
>
<Button
theme="secondary"
<Buttons
variant="secondary"
onClick={onClick}
label={isLoading ? <Spinner noMargin /> : text}
/>
Expand Down
4 changes: 2 additions & 2 deletions src/modules/viewer/NoViewerButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import React from 'react'

import { useClient } from 'cozy-client'
import { useVaultClient } from 'cozy-keys-lib'
import Button from 'cozy-ui/transpiled/react/deprecated/Button'
import Buttons from 'cozy-ui/transpiled/react/Buttons'

import { downloadFile } from './helpers'

const NoViewerButton = ({ file, t }) => {
const client = useClient()
const vaultClient = useVaultClient()
return (
<Button
<Buttons
onClick={() => downloadFile(client, file, { vaultClient })}
label={t('Viewer.noviewer.download')}
/>
Expand Down

0 comments on commit deb2d70

Please sign in to comment.