woocommerce/plugins/woocommerce-admin/client/components/flag
Kelly Dwan d36511479e Docs Project: Add documentation parser + inline documentation (https://github.com/woocommerce/woocommerce-admin/pull/336)
* Switch all components to default exports

This ensures we can read all components for documentation generation (plus, standardizing is good)

* Add documentation to component file

* Fix table exports

* Move readme docs into inline docs

Includes updating new props, adding prop shapes

* Add doc-generation scripts to pull exported component docs into folder

* Remove key propType, causing react special-keys warning

* Fix proptype

* Update incorrect comment

* Remove template import, we can just use string concat

* Fix typo, update docs
2018-08-31 13:27:21 -04:00
..
README.md Add Flag Component (https://github.com/woocommerce/woocommerce-admin/pull/197) 2018-07-16 12:28:26 -04:00
index.js Docs Project: Add documentation parser + inline documentation (https://github.com/woocommerce/woocommerce-admin/pull/336) 2018-08-31 13:27:21 -04:00
style.scss Add Flag Component (https://github.com/woocommerce/woocommerce-admin/pull/197) 2018-07-16 12:28:26 -04:00

README.md

Flag

Use the Flag component to display a country's flag.

How to use:

import { Flag } from 'components/flag';

render: function() {
  return (
    <Flag
		code="US"
		size={ 24 }
	/>
  );
}

Props

  • code: Two letter, three letter or three digit country code.
  • order: An order can be passed instead of code and the code will automatically be pulled from the billing or shipping data.
  • width: Flag image width.
  • height: Flag image height.
  • round: Default true. True to display a rounded flag.
  • className: Additional CSS classes.