mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 08:58:26 +00:00
Merge pull request #12465 from ToolJet/link-comp-bugs
[BugFixes] : fix link QA bugs
This commit is contained in:
commit
c00a32aac5
2 changed files with 28 additions and 9 deletions
|
|
@ -19,8 +19,7 @@ export const Link = ({ height, properties, styles, fireEvent, setExposedVariable
|
|||
const computedStyles = {
|
||||
display: 'flex',
|
||||
alignItems: verticalAlignment === 'top' ? 'flex-start' : verticalAlignment === 'center' ? 'center' : 'flex-end',
|
||||
justifyContent:
|
||||
horizontalAlignment === 'left' ? 'flex-start' : horizontalAlignment === 'center' ? 'center' : 'flex-end',
|
||||
textAlign: horizontalAlignment === 'left' ? 'left' : horizontalAlignment === 'center' ? 'center' : 'right',
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
boxShadow,
|
||||
|
|
@ -113,10 +112,20 @@ export const Link = ({ height, properties, styles, fireEvent, setExposedVariable
|
|||
onMouseOver={() => {
|
||||
fireEvent('onHover');
|
||||
}}
|
||||
style={{ color: textColor, fontSize: textSize, cursor: isDisabled ? 'not-allowed' : 'pointer' }}
|
||||
style={{ width: '100%' }}
|
||||
ref={clickRef}
|
||||
>
|
||||
<span className="d-flex justify-content-center">
|
||||
<span
|
||||
className="d-flex"
|
||||
style={{
|
||||
fontSize: textSize,
|
||||
cursor: 'auto',
|
||||
justifyContent:
|
||||
horizontalAlignment === 'left' ? 'flex-start' : horizontalAlignment === 'center' ? 'center' : 'flex-end',
|
||||
color: textColor,
|
||||
paddingBottom: verticalAlignment === 'bottom' ? '1px' : '0px',
|
||||
}}
|
||||
>
|
||||
{iconVisibility && (
|
||||
<IconElement
|
||||
style={{
|
||||
|
|
@ -130,7 +139,7 @@ export const Link = ({ height, properties, styles, fireEvent, setExposedVariable
|
|||
stroke={1.5}
|
||||
/>
|
||||
)}
|
||||
{linkTextState}
|
||||
<span className="link-text">{linkTextState}</span>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,18 @@
|
|||
.link-widget {
|
||||
a {
|
||||
text-underline-offset: 32%; // Adds space between text and underline
|
||||
&:hover {
|
||||
color: var(--link-hover-color) !important;
|
||||
}
|
||||
text-decoration: none !important;
|
||||
pointer-events: none;
|
||||
cursor: none !important;
|
||||
|
||||
.link-text {
|
||||
pointer-events: all;
|
||||
text-underline-offset: 32%; // Adds space between text and underline
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
text-decoration-color: var(--link-hover-color) !important;
|
||||
color: var(--link-hover-color) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue