Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(useEventEmitter): move import from "helpers" to "component-helper" #1577

Merged
merged 1 commit into from
Sep 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/dnb-eufemia/src/shared/component-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export { usePropsWithContext } from './hooks/usePropsWithContext'
export { InteractionInvalidation } from './helpers/InteractionInvalidation'
export { extendPropsWithContext } from './helpers/extendPropsWithContext'
export { registerElement } from './custom-element'
export { useEventEmitter } from './helpers/useEventEmitter'

export { getPreviousSibling, warn }

Expand Down
4 changes: 2 additions & 2 deletions packages/dnb-eufemia/src/shared/helpers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/**
* Global helpers
*
* NB: Do not import other deps in this file.
* Just to have things clean and one directional.
*/

export const PLATFORM_MAC = 'Mac|iPad|iPhone|iPod'
Expand All @@ -18,8 +20,6 @@ export let IS_MAC = false
export let IS_ANDROID = false
export let IS_LINUX = false

export * from './helpers/useEventEmitter'

export const isMac = () =>
(IS_MAC =
typeof navigator !== 'undefined' &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import React from 'react'
import { useEventEmitter } from '../helpers'
import { useEventEmitter } from '../component-helper'
import ToggleButton from '../../components/toggle-button/ToggleButton'

export default {
Expand Down