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

feat(Icon): add an examples for color prop #1275

Merged
merged 1 commit into from
Feb 18, 2022
Merged

Conversation

thaytharma
Copy link
Contributor

Added examples for color property in Icon.
Also added some info about using CSS variables as a color option in the docs.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 7, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 0fa440d:

Sandbox Source
eufemia-starter Configuration

@gatsby-cloud
Copy link

gatsby-cloud bot commented Feb 7, 2022

Gatsby Cloud Build Report

DNB Eufemia Portal

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 8m

Performance

Lighthouse report

Metric Score
Performance 🔶 66
Accessibility 💚 100
Best Practices 💚 100
SEO 💚 92

🔗 View full report

Copy link
Member

@tujoworker tujoworker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌 Awesome work! 🙌

I just have a suggestion on the property description.

@@ -11,7 +11,7 @@ showTabs: true
| `border` | _(optional)_ use `true` to display a rounded border with an inherited color. Keep in mind that the icon will have a larger total width and height of `+0.5em`. |
| `alt` | _(optional)_ the alternative label (text version) of the icon. Defaults to the imported icon name. |
| `size` | _(optional)_ the dimension of the icon. This will be the `viewBox` and represent `width` and `height`. Defaults to `16`. You can use `small`,`medium`, `large` or `auto`. Auto will enable that the icon size gets inherited by the parent HTML element if it provides a `font-size`. |
| `color` | _(optional)_ sets a color property to the `svg` markup. Default is no color, which means _black_ |
| `color` | _(optional)_ sets a color property to the `svg` markup. Default is no color, which means _black._ `color` can be any valid color property, such as Hex, RGB or any CSS variable from the [colors table](/uilib/usage/customisation/colors), e.g. `var(--color-ocean-green)`. |
Copy link
Member

@tujoworker tujoworker Feb 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `color` | _(optional)_ sets a color property to the `svg` markup. Default is no color, which means _black._ `color` can be any valid color property, such as Hex, RGB or any CSS variable from the [colors table](/uilib/usage/customisation/colors), e.g. `var(--color-ocean-green)`. |
| `color` | _(optional)_ the color can be any valid color property, such as Hex, RGB or preferable – any CSS variable from the [colors table](/uilib/usage/customisation/colors), e.g. `var(--color-ocean-green)`. Default is no color, which means `--color-black-80`. |

Copy link
Contributor Author

@thaytharma thaytharma Feb 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion! This has been updated 😊

@thaytharma thaytharma merged commit 67f8121 into main Feb 18, 2022
@thaytharma thaytharma deleted the feat/icon-colors branch February 18, 2022 09:28
tujoworker pushed a commit that referenced this pull request Feb 21, 2022
# [9.23.0-beta.4](v9.23.0-beta.3...v9.23.0-beta.4) (2022-02-21)

### Bug Fixes

* **Dropdown:** disabled tertiary dropdown ([c1b4c4b](c1b4c4b))
* **Styles:** ensure independent styling packages have declared their dependencies ([8b3c230](8b3c230))

### Features

* **esm:** remove esm directory in package build ([f189b62](f189b62))
* **Icon:** add examples for color property ([#1275](#1275)) ([67f8121](67f8121))
* **Tabs:** Enhance parent width handling and remove auto edge detection ([d002f2c](d002f2c))
* **TypeScript:** remove original ts/tsx files and only leave type definition files ([#1292](#1292)) ([79bdfb4](79bdfb4))
@tujoworker
Copy link
Member

🎉 This PR is included in version 9.23.0-beta.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

tujoworker pushed a commit that referenced this pull request Feb 22, 2022
# [9.23.0](v9.22.0...v9.23.0) (2022-02-22)

### Bug Fixes

* **Dropdown:** disabled tertiary dropdown ([c1b4c4b](c1b4c4b))
* **Modal:** add possibility for camelcase props ([4127452](4127452))
* **ProgressIndicator:** css change to fix aliasing artifacts for ProgressIndicator ([ab8859e](ab8859e))
* set Eufemia.version during release ([e74d441](e74d441))
* **Styles:** ensure independent styling packages have declared their dependencies ([8b3c230](8b3c230))
* **Tabs:** align to new UX designs ([794bf70](794bf70))
* **Tag:** fix Tag.Group spacing ([d7b77a2](d7b77a2))

### Features

* **esm:** remove esm directory in package build ([f189b62](f189b62))
* **Icon:** add examples for color property ([#1275](#1275)) ([67f8121](67f8121))
* Separate Drawer and Dialog from Modal ([ebe8e6a](ebe8e6a))
* **Tabs:** Enhance parent width handling and remove auto edge detection ([99ed393](99ed393))
* **TypeScript:** remove original ts/tsx files and only leave type definition files ([#1292](#1292)) ([79bdfb4](79bdfb4))
@tujoworker
Copy link
Member

🎉 This PR is included in version 9.23.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants