diff --git a/README.md b/README.md index 87c5b37..aff4402 100644 --- a/README.md +++ b/README.md @@ -19,11 +19,11 @@ This project was bootstrapped with [Create React App](https://github.com/faceboo - Listens to updates in scrollHeight of scroll container( due to introduction of new data), and fetches more data if avaiable data does not fill updated scroll container. - And yes of-course, fetches more data when user scrolls to a given threshold. * `PlatformPusherNotifications` : Central hub for complete application to display any toast notifications to user. Managed by Context API. Supports following features- - - Diplays a max of 5 toasts at a time. All the rest notifications are kept in stack, their timer starts only when they appear to the user. - - Individual timeout can be provided when pushing a notification. - - Notification toast's timer pause on hover. + - Diplays a max of 5 toasts at a time. Overflowing notifications are kept in stack, their timer starts only when they appear to the user. + - Custom timeout can be provided when pushing a notification. + - Notification toast's timer pauses on hover. - Notification can be expired early by clicking on the toast. -* `PausableTimer` : A customised wrapper over 'setTimeout' that powers each individual toast notification. Supports following functionality over and above 'setTimeout' +* `PausableTimer` : A customised wrapper over 'setTimeout' that powers toast notification under the hood. Supports following functionality over and above 'setTimeout' - Option to start timer immediately or when invoked manually. - Pause/Resume timer as required. - Finish the timer early when required. diff --git a/src/setupTests.ts b/src/setupTests.ts deleted file mode 100644 index 74b1a27..0000000 --- a/src/setupTests.ts +++ /dev/null @@ -1,5 +0,0 @@ -// jest-dom adds custom jest matchers for asserting on DOM nodes. -// allows you to do things like: -// expect(element).toHaveTextContent(/react/i) -// learn more: https://github.com/testing-library/jest-dom -import '@testing-library/jest-dom/extend-expect'; diff --git a/src/styles/mixins/index.ts b/src/styles/mixins.ts similarity index 81% rename from src/styles/mixins/index.ts rename to src/styles/mixins.ts index 051ba65..19b07b1 100644 --- a/src/styles/mixins/index.ts +++ b/src/styles/mixins.ts @@ -1,6 +1,3 @@ -//typeDefs -import { FlexContainerOptions } from './interfaces'; - export function centerToParent(): string { return ` position: absolute; @@ -27,7 +24,12 @@ export function flexContainer({ alignItems = 'flex-start', justifyContent = 'flex-start', flexWrap = 'nowrap', -}: FlexContainerOptions) { +}: { + flexDirection?: 'row' | 'column'; + alignItems?: 'center' | 'flex-start' | 'flex-end' | 'stretch'; + justifyContent?: 'flex-start' | 'center' | 'space-around' | 'space-between' | 'flex-end'; + flexWrap?: 'wrap' | 'nowrap'; +}) { return ` display: flex; flex-direction: ${flexDirection}; diff --git a/src/styles/mixins/interfaces.ts b/src/styles/mixins/interfaces.ts deleted file mode 100644 index 38db8fc..0000000 --- a/src/styles/mixins/interfaces.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface FlexContainerOptions { - flexDirection?: 'row' | 'column'; - alignItems?: 'center' | 'flex-start' | 'flex-end' | 'stretch'; - justifyContent?: 'flex-start' | 'center' | 'space-around' | 'space-between' | 'flex-end'; - flexWrap?: 'wrap' | 'nowrap'; -}