docs: content updates made in icon.md

This commit is contained in:
sikehish 2024-10-16 19:36:53 +05:30
parent e771254867
commit 3629046d84

View file

@ -3,7 +3,7 @@ id: icon
title: Icon
---
An **Icon** widget can be used to add icons(sourced from icon library). It supports events like on hover and on click.
An **Icon** component can be used to add icons(sourced from icon library). It supports events like on hover and on click.
<div style={{paddingTop:'24px'}}>
@ -19,14 +19,12 @@ An **Icon** widget can be used to add icons(sourced from icon library). It suppo
## Events
To add an event, click on the Icon widget's configuration handle to open the widget properties on the components drawer on the right. Go to the **Events** section and click on **+ Add handler**.
The Icon component supports the following events:
The Icon widget supports the following events:
| <div style={{ width:"100px"}}> Event </div> | <div style={{ width:"100px"}}> Description </div> |
| :------------------------------------------ | :--------------------------------------------------------------- |
| On hover | This event is triggered when the cursor is hovered over the icon |
| On click | This event is triggered when the icon is clicked |
| <div style={{ width:"100px"}}> Event </div> | <div style={{ width:"100px"}}> Description </div> |
| :------------------------------------------ | :----------------------------------------------------- |
| On hover | Triggers whenever the cursor is hovered over the icon. |
| On click | Triggers whenever the icon is clicked. |
Just like any other event on ToolJet, you can set multiple handlers for any of the above-mentioned events.
@ -61,7 +59,7 @@ There are currently no exposed variables for the component.
## General
<b>Tooltip:</b> Set a tooltip text to specify the information when the user moves the mouse pointer over the widget.
<b>Tooltip:</b> Set a tooltip text to specify the information when the user moves the mouse pointer over the component.
</div>
@ -78,13 +76,15 @@ There are currently no exposed variables for the component.
<div style={{paddingTop:'24px'}}>
---
## Styles
| <div style={{ width:"100px"}}> Style </div> | <div style={{ width:"100px"}}> Description </div> | <div style={{ width:"135px"}}> Expected Value </div> |
| :------------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| Icon color | You can change the color of the Icon widget by entering the Hex color code or choosing a color of your choice from the color picker. |
| Visibility | This is to control the visibility of the widget. | If `{{false}}` the widget will not visible after the app is deployed. | It can only have boolean values i.e. either `{{true}}` or `{{false}}`. By default, it's set to `{{true}}`. |
| Box shadow | This property adds a shadow to the widget. | You can use different values for box shadow property like offsets, blur, spread, and the color code. |
| <div style={{ width:"100px"}}> Style </div> | <div style={{ width:"100px"}}> Description </div> | <div style={{ width:"135px"}}> Expected Value </div> |
| :------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| Icon color | You can change the color of the Icon component by entering the Hex color code or choosing a color of your choice from the color picker. |
| Visibility | This is to control the visibility of the component. | If `{{false}}` the component will not visible after the app is deployed. | It can only have boolean values i.e. either `{{true}}` or `{{false}}`. By default, it's set to `{{true}}`. |
| Box shadow | This property adds a shadow to the component. | You can use different values for box shadow property like offsets, blur, spread, and the color code. |
:::info
Any property having **fx** button next to its field can be **programmatically configured**.