generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 2
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 #705 from bcgov/SRS-353
Srs 353
- Loading branch information
Showing
61 changed files
with
3,040 additions
and
852 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.custom-action-btn { | ||
border-radius: var(--surface-border-radius-medium); | ||
background: var(--surface-primary-default, #1E5189) !important; | ||
padding: var(--layout-padding-small) var(--layout-padding-medium) var(--layout-padding-small) var(--layout-padding-medium); | ||
font-size: 16px; | ||
font-weight: 400; | ||
line-height: 24px; | ||
text-align: center; | ||
color: var(--typography-color-primary-invert, #FFFFFF) !important; | ||
} | ||
|
||
.custom-action-btn:hover { | ||
border: 3px solid var(--surface-color-primary-activeBorder, #2E5DD7) !important; | ||
} | ||
|
||
.custom-action-menu { | ||
border-radius: var(--surface-border-radius-medium) !important; | ||
padding: var(--layout-padding-medium) 0px var(--layout-padding-medium) 0px !important; | ||
background-color: var(--surface-background-white) !important; | ||
box-shadow: var(--surface-shadow-medium); | ||
border: none !important; | ||
} | ||
|
||
.custom-action-item { | ||
display: flex !important; | ||
padding: var(--layout-padding-small) var(--layout-padding-medium) var(--layout-padding-small) var(--layout-padding-medium) !important; | ||
gap: var(--layout-margin-medium) ; | ||
font-family: BC Sans; | ||
font-size: 16px; | ||
font-weight: 400; | ||
line-height: 27.01px; | ||
text-align: left; | ||
color: var(--typography-color-primary) !important; | ||
} | ||
|
||
.custom-action-item:hover { | ||
background: var(--surface-color-secondary-hover, #EDEBE9) !important; | ||
color: var(--typography-color-secondary, #474543) !important; | ||
} | ||
|
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,22 @@ | ||
import { IActions } from "./IActions"; | ||
import Dropdown from "react-bootstrap/Dropdown"; | ||
import './Actions.css'; | ||
|
||
const Actions: React.FC<IActions> = ({ label, items, onItemClick }) => { | ||
return ( | ||
<Dropdown> | ||
<Dropdown.Toggle variant="" id="dropdown-action" className="custom-action-btn"> | ||
{label} | ||
</Dropdown.Toggle> | ||
<Dropdown.Menu className="custom-action-menu"> | ||
{items.map((item, index) => ( | ||
<Dropdown.Item key={index} onClick={() => onItemClick(item.value)} className="custom-action-item"> | ||
{item.label} | ||
</Dropdown.Item> | ||
))} | ||
</Dropdown.Menu> | ||
</Dropdown> | ||
); | ||
} | ||
|
||
export default Actions; |
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,17 @@ | ||
import { UserMode } from "../../helpers/requests/userMode"; | ||
import { DropdownItem } from "./IActions"; | ||
|
||
export const ActionItems: DropdownItem[] = [ | ||
{ | ||
label:'Edit Mode', | ||
value: UserMode.EditMode | ||
}, | ||
{ | ||
label:'SR Mode', | ||
value: UserMode.SrMode | ||
}, | ||
{ | ||
label:'Delete', | ||
value: UserMode.DeleteMode | ||
}, | ||
] |
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,13 @@ | ||
import { UserMode } from "../../helpers/requests/userMode"; | ||
|
||
export interface DropdownItem { | ||
label: string; | ||
value: UserMode; | ||
} | ||
|
||
export interface IActions { | ||
label: string; | ||
items: DropdownItem[]; | ||
onItemClick: (value: string) => void; | ||
} | ||
|
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,23 @@ | ||
export enum IChangeType { | ||
Added, | ||
Modified, | ||
Deleted, | ||
None, | ||
} | ||
|
||
export class ChangeTracker { | ||
changeType: IChangeType = IChangeType.None; | ||
label: string = ""; | ||
|
||
constructor(changeType: IChangeType, label: string) { | ||
this.changeType = changeType; | ||
this.label = label; | ||
} | ||
|
||
toPlainObject() { | ||
return { | ||
changeType: this.changeType, | ||
label: this.label, | ||
}; | ||
} | ||
} |
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.