-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'UIORGS-356' of https://github.com/folio-org/ui-organiza…
…tions into UIORGS-356
- Loading branch information
Showing
11 changed files
with
116 additions
and
90 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
28 changes: 11 additions & 17 deletions
28
...n/components/OrganizationContactInfoVersionView/components/ContactAddressesVersionView.js
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
7 changes: 7 additions & 0 deletions
7
...tInfoVersionView/components/ContactCardHeaderVersionView/ContactCardHeaderVersionView.css
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,7 @@ | ||
.cardHeader { | ||
margin: 0; | ||
|
||
& .mark { | ||
background-color: mark; | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...ctInfoVersionView/components/ContactCardHeaderVersionView/ContactCardHeaderVersionView.js
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,26 @@ | ||
import PropTypes from 'prop-types'; | ||
import { useContext } from 'react'; | ||
import { FormattedMessage } from 'react-intl'; | ||
|
||
import { VersionViewContext } from '@folio/stripes-acq-components'; | ||
|
||
import css from './ContactCardHeaderVersionView.css'; | ||
|
||
export const ContactCardHeaderVersionView = ({ isPrimary, name }) => { | ||
const versionContext = useContext(VersionViewContext); | ||
|
||
const isUpdated = versionContext?.paths?.includes(name); | ||
|
||
const headerStart = ( | ||
<h4 className={css.cardHeader}> | ||
<span className={isUpdated ? css.mark : ''}><FormattedMessage id={`ui-organizations.${isPrimary ? 'primaryItem' : 'alternateItem'}`} /></span> | ||
</h4> | ||
); | ||
|
||
return headerStart; | ||
}; | ||
|
||
ContactCardHeaderVersionView.propTypes = { | ||
isPrimary: PropTypes.bool.isRequired, | ||
name: PropTypes.string.isRequired, | ||
}; |
1 change: 1 addition & 0 deletions
1
...nents/OrganizationContactInfoVersionView/components/ContactCardHeaderVersionView/index.js
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 @@ | ||
export { ContactCardHeaderVersionView } from './ContactCardHeaderVersionView'; |
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
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
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