question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Toast] Getting: Attempted import error: 'NotificationActionButton' is not exported from 'carbon-components-react'.

See original GitHub issue

What package(s) are you using?

  • carbon-components
  • carbon-components-react

Summary

I’m trying to follow the example of Toast from StoryBook but I’m getting this error: Attempted import error: ‘NotificationActionButton’ is not exported from ‘carbon-components-react’.

What is the Action button in inlineNotification stands for?

I was expecting to see a button that triggers the add/remove to/from toast, are there such hooks for adding removing?

For now I used a Tooltip to display the notifications inside: image

But I’m facing some issues with that. For example when clicking on the close button of one notification the tooltip is closed and the notification does not disappear when opening the tooltip again. If I putt the notification outside the tooltip, the close button works. But I don’t want to have notifications floating on the screen, I need to put them all in one drawer and handling it as a state array that I can add/remove from. I’ll try to use the onCloseButtonClick event to remove from the list, and push to the state array to add new ones…

  1. Is it a good approach or there is something more acceptable?
  2. Is there a way to prevent the tooltip window auto close when removing a notification. To be closed only when pressing on the tooltip icon for example.
  3. Is there a max-height property that makes the opened window with scroll bar if there are many notification?

this. what happens if I set max-height: image

Relevant information

Please check this sandbox: https://codesandbox.io/s/brave-voice-bdrx0

  1. How to make the tooltip icon with white color I tried making the Tooltips icons white by adding :

.bx–tooltip { max-width: none; /width: 100%;/ }

.bx–tooltip-icon svg { fill: white; }

But it didn’t work for me.

Sorry for listing more than one item in the same thread, if needed will split.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
asudohcommented, Jul 30, 2019

Thanks @shixiedesign for your feedback! @zbeedatm Please make sure working with your designers to figure out the design that fits well with Carbon design ecosystem. If your designer still comes back with the design seen in the screenshot above, please follow what @shixiedesign suggested.

0reactions
asudohcommented, Mar 13, 2020

^ Sounds a different one, if you have a reduced case based on https://codesandbox.io/s/github/carbon-design-system/carbon/tree/master/packages/react/examples/codesandbox feel free to enter an issue. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

'Toast' is not exported from 'react-bootstrap' - Stack Overflow
Change your import to import { Toast } from 'react-bootstrap/Toast'.
Read more >
Guide - Carbon Design System
This guide helps you update your project to Carbon v11. It is broken into sections based on packages that you are using in...
Read more >
0 - Overview / Getting Started - About Storybook ⋅ Storybook
Carbon - Components imported from Carbon and re-exported with no modifications. For additional guidance, see the Watson IoT Design Site. Exports table.
Read more >
Your browser can't play this video. Learn more - YouTube
SET YOUR LIKE THERE Failed to compile./src/App.jsAttempted import error : 'Articles' is not exported from './components/Articles'.
Read more >
Attempted import error: does not contain a default export
Blog : Referencehttps://progvocab.blogspot.com/2020/01/ attempted - import - error -does- not -contain.html.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found