Guest User

Untitled

a guest
May 27th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. export interface DictionaryEnableValueForModal {
  2. enableValue: boolean;
  3. }
  4.  
  5. export type SingleDictionaryState = Readonly<{
  6. currentEnableValue: DictionaryEnableValueForModal;
  7. }>;
  8.  
  9. export const initialState: SingleDictionaryState = {
  10. currentEnableValue: {
  11. enableValue: true,
  12. },
  13. };
  14.  
  15. const mapStateToProps = (state: AppState, stateProps: OwnProps): StateProps => ({
  16. currentDictionaryEnableValueForModal: state.singleDictionary.currentEnableValue,
  17. });
  18.  
  19. export interface StateProps {
  20. currentDictionaryEnableValueForModal: DictionaryEnableValueForModal;
  21. }
  22.  
  23. return (
  24. <Modal
  25. name={name}
  26. title={this.titleDisabled}
  27. footerButtons={buttons}
  28. >
  29. <React.Fragment>
  30. <div>
  31. State = {this.props.currentDictionaryEnableValueForModal.enableValue}
  32. </div>
  33. <div>
  34. {this.labelDisabled()}
  35. </div>
  36. </React.Fragment>
  37. </Modal>
  38. );
Add Comment
Please, Sign In to add comment