Skip to content

Commit bfb3c2f

Browse files
committed
Merge branch 'UOF-61_merge-latest-uof' of github.com:topcoder-platform/platform-ui into UOF-61_merge-latest-uof
2 parents c782fbe + 74a13c3 commit bfb3c2f

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

src/libs/ui/lib/components/button/link-button/LinkButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { omit, pick } from 'lodash'
44

55
import Button, { ButtonProps } from '../Button'
66

7-
export type LinkButtonProps = ButtonProps & LinkProps & {
8-
to: To
7+
export type LinkButtonProps = ButtonProps & Omit<LinkProps, 'to'> & {
8+
to?: To
99
}
1010

1111
const linkPropsList: string[] = [

src/libs/ui/lib/components/content-layout/ContentLayout.module.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
.content {
44
flex: 1 1 auto;
55
display: flex;
6+
padding-bottom: $sp-4;
67

78
.content-outer {
89
max-width: $xxl-min;

src/libs/ui/lib/components/form/Form.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
} from 'react'
1313
import classNames from 'classnames'
1414

15-
import { Button } from '../button'
15+
import { LinkButton } from '../button'
1616
import { IconOutline } from '../svgs'
1717
import '../../styles/index.scss'
1818

@@ -174,9 +174,11 @@ const Form: <
174174
|| !!props.shouldDisableButton?.(isPrimaryGroup, index)
175175

176176
return (
177-
<Button
177+
<LinkButton
178178
{...button}
179179
{...{ [button.buttonStyle ?? 'primary']: true }}
180+
to={button.route ?? button.url}
181+
type={button.type ?? (button.isReset ? 'reset' : button.isSubmit ? 'submit' : 'button')}
180182
size='lg'
181183
key={button.label || `button-${index}`}
182184
disabled={disabled}

0 commit comments

Comments
 (0)