Skip to content

Commit

Permalink
feat(emulsif-237): convert links to support sdc
Browse files Browse the repository at this point in the history
  • Loading branch information
Mari Nez committed Jul 24, 2024
1 parent a2cf541 commit 4e6222c
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 6 deletions.
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'
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,
});

0 comments on commit 4e6222c

Please sign in to comment.