Skip to content

Commit

Permalink
STSMACOM-789-poppy-dcb - Extend NotesAccordion and NotesSmartAccodion…
Browse files Browse the repository at this point in the history
… components to accept a prop hideNewButton (#1415)
  • Loading branch information
Terala-Priyanka authored Nov 20, 2023
1 parent c2c5081 commit 09a33a0
Show file tree
Hide file tree
Showing 4 changed files with 353 additions and 306 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change history for stripes-smart-components

## IN PROGRESS

* Extend NotesAccordion and NotesSmartAccodion components to accept a prop hideNewButton. Refs STSMACOM-789.

## [9.0.1](https://github.com/folio-org/stripes-smart-components/tree/v9.0.1) (2023-10-25)
[Full Changelog](https://github.com/folio-org/stripes-smart-components/compare/v9.0.0...v9.0.1)

Expand Down
4 changes: 4 additions & 0 deletions lib/Notes/NotesSmartAccordion/NotesSmartAccordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class NotesSmartAccordion extends Component {
entityType: PropTypes.string.isRequired,
headerProps: PropTypes.object,
hideAssignButton: PropTypes.bool,
hideNewButton: PropTypes.bool,
history: PropTypes.object.isRequired,
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
Expand All @@ -67,6 +68,7 @@ class NotesSmartAccordion extends Component {

static defaultProps = {
hideAssignButton: false,
hideNewButton: false,
label: <FormattedMessage id="stripes-smart-components.notes" />,
referredRecordData: {},
};
Expand Down Expand Up @@ -365,6 +367,7 @@ class NotesSmartAccordion extends Component {
open,
id,
hideAssignButton,
hideNewButton,
label,
headerProps,
} = this.props;
Expand All @@ -391,6 +394,7 @@ class NotesSmartAccordion extends Component {
id={id}
open={open}
hideAssignButton={hideAssignButton}
hideNewButton={hideNewButton}
onToggle={onToggle}
label={label}
onHeaderClick={this.onHeaderClick}
Expand Down
Loading

0 comments on commit 09a33a0

Please sign in to comment.