-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(emulsif-237): convert links to support sdc
- Loading branch information
Mari Nez
committed
Jul 24, 2024
1 parent
a2cf541
commit 4e6222c
Showing
3 changed files
with
35 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
}); |