Reorg notifications feature files

This commit is contained in:
Bettenbuk Zoltan 2019-03-27 15:00:10 +01:00 committed by Zoltan Bettenbuk
parent f12317dc59
commit 10e951c17c
14 changed files with 39 additions and 14 deletions

View File

@ -1,3 +1,5 @@
// @flow
/**
* The type of (redux) action which signals that all the stored notifications
* need to be cleared.

View File

@ -0,0 +1,3 @@
// @flow
export * from './native';

View File

@ -0,0 +1,3 @@
// @flow
export * from './web';

View File

@ -3,12 +3,13 @@
import React from 'react';
import { Text, TouchableOpacity, View } from 'react-native';
import { Icon } from '../../base/font-icons';
import { translate } from '../../base/i18n';
import { Icon } from '../../../base/font-icons';
import { translate } from '../../../base/i18n';
import AbstractNotification, {
type Props
} from './AbstractNotification';
} from '../AbstractNotification';
import styles from './styles';
/**

View File

@ -3,12 +3,13 @@
import React from 'react';
import { View } from 'react-native';
import { connect } from '../../base/redux';
import { connect } from '../../../base/redux';
import AbstractNotificationsContainer, {
_abstractMapStateToProps,
type Props as AbstractProps
} from './AbstractNotificationsContainer';
} from '../AbstractNotificationsContainer';
import Notification from './Notification';
import styles from './styles';

View File

@ -1,2 +1,4 @@
// @flow
export { default as Notification } from './Notification';
export { default as NotificationsContainer } from './NotificationsContainer';

View File

@ -1,11 +1,11 @@
// @flow
import { BoxModel, createStyleSheet, ColorPalette } from '../../base/styles';
import { BoxModel, ColorPalette } from '../../../base/styles';
/**
* The styles of the React {@code Components} of the feature notifications.
*/
export default createStyleSheet({
export default {
/**
* The content (left) column of the notification.
@ -58,4 +58,4 @@ export default createStyleSheet({
notificationContent: {
flexDirection: 'column'
}
});
};

View File

@ -7,13 +7,13 @@ import WarningIcon from '@atlaskit/icon/glyph/warning';
import { colors } from '@atlaskit/theme';
import React from 'react';
import { translate } from '../../base/i18n';
import { translate } from '../../../base/i18n';
import { NOTIFICATION_TYPE } from '../constants';
import { NOTIFICATION_TYPE } from '../../constants';
import AbstractNotification, {
type Props
} from './AbstractNotification';
} from '../AbstractNotification';
declare var interfaceConfig: Object;

View File

@ -3,12 +3,13 @@
import { FlagGroup } from '@atlaskit/flag';
import React from 'react';
import { connect } from '../../base/redux';
import { connect } from '../../../base/redux';
import AbstractNotificationsContainer, {
_abstractMapStateToProps as _mapStateToProps,
type Props
} from './AbstractNotificationsContainer';
} from '../AbstractNotificationsContainer';
import Notification from './Notification';
/**

View File

@ -0,0 +1,4 @@
// @flow
export { default as Notification } from './Notification';
export { default as NotificationsContainer } from './NotificationsContainer';

View File

@ -1,3 +1,5 @@
// @flow
/**
* The set of possible notification types.
*

View File

@ -1,3 +1,5 @@
// @flow
import { toState } from '../base/redux';
/**
@ -7,7 +9,7 @@ import { toState } from '../base/redux';
* @param {Object|Function} stateful - The redux store state.
* @returns {boolean}
*/
export function areThereNotifications(stateful) {
export function areThereNotifications(stateful: Object | Function) {
const state = toState(stateful);
const { enabled, notifications } = state['features/notifications'];

View File

@ -1,3 +1,5 @@
// @flow
export * from './actions';
export * from './actionTypes';
export * from './components';

View File

@ -1,3 +1,5 @@
// @flow
import { ReducerRegistry } from '../base/redux';
import {