mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-13 23:16:46 +00:00
Merge pull request #10730 from overleaf/ds-settings-page-disabled-btn-fix
added a new class btn-disabled for pointer-events GitOrigin-RevId: 334d81f15a7c8446a7ffa16dfbc6f3852b4533a9
This commit is contained in:
parent
4adfca52bf
commit
ac8edba968
1 changed files with 18 additions and 9 deletions
|
@ -104,7 +104,13 @@ function ActionButton({
|
|||
disabled,
|
||||
}: ActionButtonProps) {
|
||||
const { t } = useTranslation()
|
||||
|
||||
const classNames = require('classnames')
|
||||
const classes = classNames(
|
||||
'btn',
|
||||
'btn-secondary-info',
|
||||
'btn-secondary',
|
||||
'text-capitalize'
|
||||
)
|
||||
if (!hasFeature) {
|
||||
return (
|
||||
<Button
|
||||
|
@ -124,14 +130,17 @@ function ActionButton({
|
|||
)
|
||||
} else {
|
||||
return (
|
||||
<Button
|
||||
bsStyle={null}
|
||||
className="btn-secondary-info btn-secondary"
|
||||
href={linkPath}
|
||||
disabled={disabled}
|
||||
>
|
||||
<span className="text-capitalize">{t('link')}</span>
|
||||
</Button>
|
||||
<>
|
||||
{disabled ? (
|
||||
<button disabled className={classes}>
|
||||
{t('link')}
|
||||
</button>
|
||||
) : (
|
||||
<a className={classes} href={linkPath}>
|
||||
{t('link')}
|
||||
</a>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue