-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4541 from stairaku/PSP-9710
PSP-9710, PSP-9313: UI/UX Cleanup - Make icons consistent across PIMS
- Loading branch information
Showing
107 changed files
with
2,294 additions
and
1,186 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
source/frontend/src/components/common/buttons/EditButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { FaEdit } from 'react-icons/fa'; | ||
import { CSSProperties } from 'styled-components'; | ||
|
||
import { StyledIconButton } from './IconButton'; | ||
|
||
interface IEditButtonProps { | ||
onClick: () => void; | ||
title?: string; | ||
icon?: React.ReactNode; | ||
'data-testId'?: string; | ||
style?: CSSProperties | null; | ||
} | ||
|
||
export const EditButton: React.FunctionComponent< | ||
React.PropsWithChildren<IEditButtonProps> | ||
> = props => { | ||
return ( | ||
<StyledIconButton | ||
variant="primary" | ||
title={props.title ?? 'edit'} | ||
onClick={props.onClick} | ||
data-testid={props['data-testId'] ?? 'edit-button'} | ||
style={props.style} | ||
> | ||
{props.icon ?? <FaEdit size={22} />} | ||
</StyledIconButton> | ||
); | ||
}; | ||
|
||
export default EditButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
source/frontend/src/components/common/buttons/ViewButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { ButtonProps } from 'react-bootstrap/Button'; | ||
import { FaEye } from 'react-icons/fa'; | ||
import { CSSProperties } from 'styled-components'; | ||
|
||
import { StyledIconButton } from './IconButton'; | ||
|
||
interface IViewButtonProps extends ButtonProps { | ||
onClick: () => void; | ||
title?: string; | ||
icon?: React.ReactNode; | ||
'data-testId'?: string; | ||
style?: CSSProperties | null; | ||
} | ||
|
||
export const ViewButton: React.FunctionComponent< | ||
React.PropsWithChildren<IViewButtonProps> | ||
> = props => ( | ||
<StyledIconButton | ||
variant="primary" | ||
title={props.title ?? 'view'} | ||
onClick={props.onClick} | ||
data-testid={props['data-testId'] ?? 'view-button'} | ||
style={props.style} | ||
> | ||
{props.icon ?? <FaEye size={22} />} | ||
</StyledIconButton> | ||
); | ||
|
||
export default ViewButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.