mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Showing links in text cells
Summary: When there is a link in a text cell (and formula cells), it will be rendered with a little clickable icon wrapped in the anchor tag with a proper link. Only links that starts with https? will be rendered as links. Links are shown in a Text and Formula fields, inside a GridView, CardView and in the Import preview dialog. Test Plan: Browser tests Reviewers: alexmojaki Reviewed By: alexmojaki Subscribers: dsagal, alexmojaki Differential Revision: https://phab.getgrist.com/D3070
This commit is contained in:
@@ -68,6 +68,15 @@ const iconDiv = styled('div', `
|
||||
background-color: var(--icon-color, black);
|
||||
`);
|
||||
|
||||
export const cssIconBackground = styled(iconDiv, `
|
||||
background-color: var(--icon-background, inherit);
|
||||
-webkit-mask: none;
|
||||
& .${iconDiv.className} {
|
||||
transition: inherit;
|
||||
display: block;
|
||||
}
|
||||
`);
|
||||
|
||||
export function icon(name: IconName, ...domArgs: DomElementArg[]): HTMLElement {
|
||||
return iconDiv(
|
||||
dom.style('-webkit-mask-image', `var(--icon-${name})`),
|
||||
|
||||
Reference in New Issue
Block a user