Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to import AUI modules in '@atlassian/aui'

Vidhya Sudhakar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 18, 2016

Hi,

I have installed aui package '@atlassian/aui' using npm in my node modules. Can anyone please give the ES6 syntax to import the modules within the code.

1 answer

1 vote
josh
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 19, 2016

Something like this should work:

import flag from '@atlassian/aui/lib/js/aui/flag';

flag({
    type: 'info',
    title: 'Issue ADG-745 has been created.',
    persistent: false,
    body: `<ul class="aui-nav-actions-list">
        <li><a href="#">View issue</a></li>
        <li><a href="#">Add to sprint</a></li>
    </ul>`
});

You can see an example here: aui-umd-example.

The examples makes use of `aui-adg`, which is hosted on a private npm registry, but the example should work for the publicly consumable NPM registry.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events