Flag CSS where/how?

UI Components for React
Post Reply
kwutzke
Posts: 201
Joined: 20 Jul 2012, 21:35

06 Sep 2020, 17:01

Hello,

I'm pretty new to React etc.

I was looking at https://github.com/primefaces/primereac ... ateDemo.js

Code:

Code: Select all

    countryBodyTemplate(rowData) {
        return (
            <>
                <img alt={rowData.country.code} src="showcase/demo/images/flag_placeholder.png" className={`flag flag-${rowData.country.code}`} width="30" />
                <span className="image-text">{rowData.country.name}</span>
            </>
        );
    }
This renders a flag icon into a table cell.

I downloaded flag_placeholder.png from Github, however nothing is being displayed. It's pretty obvious: the transparent PNG is found and the CSS classes flag and flag-us etc. arent't found.

Where do I find these styles/classes? What do I need to install/import into my file to get PrimeReact flags out of the box?

Thanks
PrimeFaces 11, Mojarra 3.0, WildFly 26 Preview, Jakarta 9.1 + PrimeReact 5, Wildfly 20

mert.sincan
Posts: 5215
Joined: 29 Jun 2013, 12:38

10 Oct 2020, 22:54

Hi,

Please see this file;
https://github.com/primefaces/primereac ... /flags.css

Maybe you can add App.js or your demo component;

Code: Select all

import './assets/style/flags.css'; // Our showcase import
Best Regards,

marteyo
Posts: 1
Joined: 30 May 2022, 13:20

05 Oct 2022, 15:44

HI, sorry but file not found.
mert.sincan wrote:
10 Oct 2020, 22:54
Hi,

Please see this file;
https://github.com/primefaces/primereac ... /flags.css

Maybe you can add App.js or your demo component;

Code: Select all

import './assets/style/flags.css'; // Our showcase import
Best Regards,

habubey
Posts: 34
Joined: 24 Aug 2022, 13:17

07 Oct 2022, 08:49

Hello,
Could this be what you're looking for?

https://github.com/primefaces/primereac ... mages/flag

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests