mirror of
https://github.com/bendtherules/is-nifty-open.git
synced 2026-08-18 13:52:20 +00:00
Add closedReason subcomponent to show similar text in multiple parent components
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import * as React from 'react';
|
||||
import { Holiday } from '../../Data/index';
|
||||
|
||||
type ObjectWithHoliday = { holiday: Holiday };
|
||||
|
||||
export class ClosedReason extends React.Component<ObjectWithHoliday, {}> {
|
||||
holiday: Holiday;
|
||||
|
||||
constructor(props: ObjectWithHoliday) {
|
||||
super(props);
|
||||
this.holiday = props.holiday;
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className="answerReason">
|
||||
<div className="holidayPrefixText">
|
||||
Closed due to
|
||||
</div>
|
||||
<div className="holidayName">
|
||||
{this.holiday.Description}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export { ClosedReason } from './Component';
|
||||
Reference in New Issue
Block a user