You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: It is strongly recommended to use the thematic names of colors of the Enchanted theme, rather than explicit rgba values. For example, `"success"` or `"action"`. This ensures consistency of colors across the UI and over time.
64
-
65
-
#### Icon button
66
-
A common pattern is to use an icon in conjunction with an Enchanted `<IconButton>`
Note: In this case the size of the icon is determined by the `size` prop of the `<IconButton>`. The icon color is controlled by the different button states (active, disabled, etc) and should not be overriden.
74
-
75
-
### Advanced
76
-
Icons from this library can take any props supported by MUI's `<SvgIcon>` component. See https://v5.mui.com/material-ui/api/svg-icon/
77
-
**Always consult with your UX contact before applying any advanced styling.**
78
-
79
-
### Usage (Web Components)
80
-
Web Components can be used in any web framework or plain HTML.
81
-
82
-
**1. Import the icon definition**
83
-
You must first import the icon's JavaScript file to define the custom element. This is typically done once in your application's main entry point.
The icons are styled internally with CSS Custom Properties. You can override these variables globally to set a theme for all icons.
122
-
```css
123
-
/* Set a default theme size and color for all icons on the page */
124
-
body {
125
-
--icon-theme-size: 24px;
126
-
--icon-theme-color: #3d3d3d;
127
-
}
128
-
```
129
24
130
25
## Development
131
-
This is a monorepo. To install dependencies for development, run `npm install` from within each package's directory (e.g., `packages/react`, `packages/web-component`, `packages/icons-builder`).
132
-
133
-
Other development commands (like those listed in the tables below) must also be run from within their respective package directories.
134
-
135
-
### Common Scripts
136
-
These scripts are available in both the React (@hcl-software/enchanted-icons) and Web Component (@hcl-software/enchanted-icons-web-component) packages.
137
-
138
-
| task | command | description |
139
-
|--|--|--|
140
-
|**Build**|`npm run build`| Compiles the package source code into a `dist` folder. |
141
-
|**Lints**|`npm run lint`| Runs the linter to check for code style issues. |
142
-
|**Lint (Fix)**|`npm run lint-fix`| Runs the linter and automatically fixes resolvable issues. |
143
-
144
-
This script is available in the internal `packages/icons-builder` package.
145
-
146
-
| task | command | description |
147
-
|--|--|--|
148
-
|**Generate**|`npm run generate`| Generates all React and Web Component icons from source SVG files. |
149
-
150
-
## Lerna Commands
151
-
152
26
This repository uses [Lerna](https://lerna.js.org/) for managing multiple packages. The most common commands are also wrapped in the root npm scripts:
Enchanted Icons is a collection of icons that are used in HCL Software products. This package exposes own creations as well as external icons from the [Carbon React Icons Package](https://github.com/carbon-design-system/carbon/tree/main/packages/icons) and exposes those as ready to use Material-UI components.
4
+
5
+
(C) 2024 HCL America Inc. Apache-2.0 license [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0)
Note: It is strongly recommended to use the thematic names of colors of the Enchanted theme, rather than explicit rgba values. For example, `"success"` or `"action"`. This ensures consistency of colors across the UI and over time.
42
+
43
+
#### Icon button
44
+
A common pattern is to use an icon in conjunction with an Enchanted `<IconButton>`
Note: In this case the size of the icon is determined by the `size` prop of the `<IconButton>`. The icon color is controlled by the different button states (active, disabled, etc) and should not be overriden.
52
+
53
+
### Advanced
54
+
Icons from this library can take any props supported by MUI's `<SvgIcon>` component. See https://v5.mui.com/material-ui/api/svg-icon/
55
+
**Always consult with your UX contact before applying any advanced styling.**
# HCL Software Enchanted Icons package for Web Components
2
+
3
+
Enchanted Icons is a collection of icons that are used in HCL Software products. This package exposes own creations as well as external icons from the [Carbon React Icons Package](https://github.com/carbon-design-system/carbon/tree/main/packages/icons) and exposes those as ready to use web components.
4
+
5
+
(C) 2024 HCL America Inc. Apache-2.0 license [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0)
0 commit comments