Add closedReason subcomponent to show similar text in multiple parent components

This commit is contained in:
2018-03-09 08:48:49 +05:30
parent 382eb4f5d1
commit f94174f7bf
2 changed files with 27 additions and 0 deletions
+26
View File
@@ -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>
);
}
}
+1
View File
@@ -0,0 +1 @@
export { ClosedReason } from './Component';