Skip to content

Commit

Permalink
feat(ActionMenu): Add some export to have better DX
Browse files Browse the repository at this point in the history
  • Loading branch information
JF-Cozy committed Mar 23, 2023
1 parent 5a98489 commit fda803a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
7 changes: 7 additions & 0 deletions react/ActionMenu/Actions/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export { makeActions } from './helpers'
export { hr } from './hr'
export { modify } from './modify'
export { call } from './call'
export { emailTo } from './emailTo'
export { smsTo } from './smsTo'
export { viewInContacts } from './viewInContacts'
10 changes: 2 additions & 8 deletions react/ActionMenu/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,8 @@ import DemoProvider from 'cozy-ui/docs/components/DemoProvider'
import Variants from 'cozy-ui/docs/components/Variants'
import DropdownButton from 'cozy-ui/transpiled/react/DropdownButton'
import FileIcon from 'cozy-ui/transpiled/react/Icons/File'
import ActionMenu, { ActionMenuItem, ActionMenuRadio, ActionMenuHeader } from 'cozy-ui/transpiled/react/ActionMenu'
import ActionMenuWithClose from 'cozy-ui/transpiled/react/ActionMenu/ActionMenuWithClose'
import ActionsItems from 'cozy-ui/transpiled/react/ActionMenu/Actions/ActionsItems'
import ActionMenuItemWrapper from 'cozy-ui/transpiled/react/ActionMenu/ActionMenuItemWrapper'
import { makeActions } from 'cozy-ui/transpiled/react/ActionMenu/Actions/helpers'
import { hr } from 'cozy-ui/transpiled/react/ActionMenu/Actions/hr'
import { modify } from 'cozy-ui/transpiled/react/ActionMenu/Actions/modify'
import { call } from 'cozy-ui/transpiled/react/ActionMenu/Actions/call'
import { ActionMenuItemWrapper, ActionMenuWithClose, ActionsItems } from 'cozy-ui/transpiled/react/ActionMenu'
import { makeActions, hr, modify, call } from 'cozy-ui/transpiled/react/ActionMenu/Actions'

initialState = { showMenu: isTesting() }

Expand Down
13 changes: 12 additions & 1 deletion react/ActionMenu/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import { ActionMenuHeader } from './ActionMenuHeader'
import { ActionMenuItem } from './ActionMenuItem'
import { ActionMenuRadio } from './ActionMenuRadio'
import { useActionMenuEffects } from './ActionMenuEffects'
import ActionMenuItemWrapper from './ActionMenuItemWrapper'
import ActionMenuWithClose from './ActionMenuWithClose'
import ActionsItems from './Actions/ActionsItems'

import styles from './styles.styl'

Expand Down Expand Up @@ -115,4 +118,12 @@ ActionMenu.defaultProps = {
}

export default ActionMenu
export { ActionMenuHeader, ActionMenuItem, ActionMenuRadio }
export {
ActionMenuHeader,
ActionMenuItem,
ActionMenuRadio,
ActionMenuItemWrapper,
ActionMenuWithClose,
ActionMenuWrapper,
ActionsItems
}

0 comments on commit fda803a

Please sign in to comment.