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

Constants for PrimeIcons #9391

Closed
cagataycivici opened this issue Oct 11, 2020 · 0 comments
Closed

Constants for PrimeIcons #9391

cagataycivici opened this issue Oct 11, 2020 · 0 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@cagataycivici
Copy link
Member

Define a constants object to choose an icon with typescript easily e.g. when defining a model. Proposed API;

import {MenuItem, PrimeIcons} from 'primeng/api';

export class MenuDemo {

    private items: MenuItem[];

    ngOnInit() {
        this.items = [{
            label: 'File',
            items: [
                {label: 'New', icon: PrimeIcons.PLUS},
                {label: 'Open', icon: PrimeIcons.DOWNLOAD}
            ]
        },
        {
            label: 'Edit',
            items: [
                {label: 'Undo', icon: PrimeIcons.REFRESH},
                {label: 'Redo', icon: PrimeIcons.REPEAT}
            ]
        }];
    }
}
@cagataycivici cagataycivici added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Oct 11, 2020
@cagataycivici cagataycivici added this to the 10.0.4 milestone Oct 11, 2020
@cagataycivici cagataycivici self-assigned this Oct 11, 2020
@cagataycivici cagataycivici modified the milestones: 10.0.4, 10.1.0 Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

1 participant