DocSpace-client/packages/shared/components/link
2024-01-10 11:01:43 +03:00
..
index.tsx Shared: refactoring and apply code guide style 2023-12-05 19:52:30 +03:00
Link.enums.ts Shared: rewrite components to typescript 2023-11-24 19:35:40 +03:00
Link.stories.tsx Shared: rewrite components to typescript 2023-11-24 19:35:40 +03:00
Link.styled.tsx Shared:Components:Table\ColorTheme: rewrite to typescript 2023-12-20 12:14:18 +03:00
Link.test.tsx Shared: rewrite components to typescript 2023-11-24 19:35:40 +03:00
Link.tsx Shared: refactoring and apply code guide style 2023-12-05 19:52:30 +03:00
Link.types.ts Shared:Components:Table\ColorTheme: rewrite to typescript 2023-12-20 12:14:18 +03:00
README.md Client: fix wrong import - export for shared components 2024-01-10 11:01:43 +03:00

Link

It is a link with 2 types:

  1. page - simple link which refer to other pages and parts of current page;
  2. action - link, which usually hasn`t hyperlink and do anything on click - open dropdown, filter data, etc

Usage

import { Link } from "@docspace/shared/components/link";
<Link type="page" color="black" href="https://github.com" isBold={true}>
  Bold page link
</Link>

Properties

Props Type Required Values Default Description
className string - - - Accepts class
color string - - #333333 Color of link
fontSize string - - 13px Font size of link
fontWeight number, string - - - Font weight of link
href string - - undefined Used as HTML href property
id string - - - Accepts id
isBold bool - - false Set font weight
isHovered bool - - false Set hovered state and effects of link.
isSemitransparent bool - - false Set css-property 'opacity' to 0.5. Usually apply for users with "pending" status
isTextOverflow bool - - true Activate or deactivate text-overflow CSS property with ellipsis (' … ') value
noHover bool - - false Disabled hover styles
onClick func - - - What the link will trigger when clicked. Only for 'action' type of link
rel string - - noopener noreferrer Used as HTML rel property
style obj, array - - - Accepts css style
tabIndex number - - -1 Used as HTML tabindex property
target oneOf - \_blank, \_self, \_parent, \_top - The target attribute specifies where the linked document will open when the link is clicked.
title string - - - Used as HTML title property
type oneOf - action, page page Type of link s