Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EMULSIF-237: Convert Links to support SDC #135

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions src/components/links/link/link.component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
$schema: https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json

name: Links
group: Components
status: stable
props:
type: object
required:
- link_url
- link_content
properties:
link_url:
type: string
title: Link's url
description: The url of the link.
data: 'https://github.com/emulsify-ds/emulsify-design-system'
link_content:
type: string
title: Link's content
description: The content/text of the link.
data: 'This is my link text'
link_attributes:
type: string
title: Link's attributes (optional)
description: The attribute of the link.
data:
target: '_blank'
mariannuar marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 0 additions & 4 deletions src/components/links/link/link.yml

This file was deleted.

10 changes: 8 additions & 2 deletions src/components/links/link/links.stories.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import link from './link.twig';
import { props } from './link.component.yml';

import linkData from './link.yml';
const linkData = props.properties;

/**
* Storybook Definition.
*/
export default { title: 'Components/Typography/Links' };

export const links = () => link(linkData);
export const links = () =>
link({
link_url: linkData.link_url.data,
link_content: linkData.link_content.data,
link_attributes: linkData.link_attributes.data,
});
2 changes: 1 addition & 1 deletion src/components/tokens/_tokens.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Do not edit directly
* Generated on Sat, 13 Jul 2024 03:47:16 GMT
* Generated on Wed, 24 Jul 2024 17:52:23 GMT
*/

:root {
Expand Down