monday-ui-react-core
Version:
Official monday.com UI resources for application development in React.js
126 lines (96 loc) • 3.23 kB
text/mdx
import { Canvas, Meta } from "@storybook/blocks";
import Link from "../Link.tsx";
import { ExternalPage, Gallery } from "../../Icon/Icons";
import { BREADCRUBMS, BUTTON, BADGE } from "../../../storybook/components/related-components/component-description-map";
import { TipButton } from "./Link.stories.helpers";
import * as LinkStories from "./Link.stories";
<Meta of={LinkStories} />
- [Overview](
- [Props](
- [Usage](
- [Variants](
- [Do’s and don’ts](
- [Use cases and examples](
- [Related components](
- [Feedback](
Link is an actionable text component with connection to another web pages.
<Canvas of={LinkStories.Overview} />
<PropsTable />
<UsageGuidelines
guidelines={[
"Use links only as part of the text or scentence.",
"Use links in order to redirect people outside of the system.",
"Links should be short with a clear action name. read more, go to, etc..."
]}
/>
<TipButton />
<Canvas of={LinkStories.States} />
<Canvas of={LinkStories.RightToLeft} />
<Canvas of={LinkStories.WithIcons} />
<ComponentRules
rules={[
{
positive: {
component: <Link text="Read more" href="https://www.monday.com" />,
description: "Keep the copy short and to the point."
},
negative: {
component: <Link text="Go to this url and read all about it" href="https://www.monday.com" />,
description: "Don’t write long messages that are clickable."
}
},
{
positive: {
component: (
<Link
text="Read more"
iconPosition={Link.iconPositions.START}
href="https://www.monday.com"
icon={ExternalPage}
/>
),
description: "Use icon from the left or right side of the link"
},
negative: {
component: [
<Link icon={Gallery} iconPosition={Link.iconPositions.END} />,
<Link icon={ExternalPage} text="Read more" iconPosition={Link.iconPositions.END} />
],
description: "Don’t use two icons for one link."
}
},
{
positive: {
component: <Link text="Read more" href="https://www.monday.com" />,
description: "Use only one link in context in text"
},
negative: {
component: [
<Link text="Read this" href="https://www.monday.com" />,
<span class="monday-storybook-link_text">or</span>,
<Link text="this" href="https://www.monday.com" />,
<Link text="Nice article" href="https://www.monday.com" />
],
description: "Don’t use multiple links near each other"
}
}
]}
/>
Use this menu to allow a user to either select one or more items from the list.
<Canvas of={LinkStories.ReferenceLink} />
Use read more to shorten long paragraphs of text
<Canvas of={LinkStories.ShorteningTexts} />
<RelatedComponents componentsNames={[BUTTON, BREADCRUBMS, BADGE]} />