From 4e6222ca88e80125db762a5acdfd3f5e0feb7a7b Mon Sep 17 00:00:00 2001 From: Mari Nez Date: Wed, 24 Jul 2024 11:47:07 -0600 Subject: [PATCH 1/4] feat(emulsif-237): convert links to support sdc --- src/components/links/link/link.component.yml | 27 ++++++++++++++++++++ src/components/links/link/link.yml | 4 --- src/components/links/link/links.stories.js | 10 ++++++-- 3 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 src/components/links/link/link.component.yml delete mode 100644 src/components/links/link/link.yml diff --git a/src/components/links/link/link.component.yml b/src/components/links/link/link.component.yml new file mode 100644 index 0000000..6870bea --- /dev/null +++ b/src/components/links/link/link.component.yml @@ -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' \ No newline at end of file diff --git a/src/components/links/link/link.yml b/src/components/links/link/link.yml deleted file mode 100644 index f7c96ef..0000000 --- a/src/components/links/link/link.yml +++ /dev/null @@ -1,4 +0,0 @@ -link_url: 'https://github.com/emulsify-ds/emulsify-design-system' -link_content: 'This is my link text' -link_attributes: - 'target': '_blank' diff --git a/src/components/links/link/links.stories.js b/src/components/links/link/links.stories.js index 83e011e..c0f574f 100644 --- a/src/components/links/link/links.stories.js +++ b/src/components/links/link/links.stories.js @@ -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, + }); From d495b9649279ce233a27430089771ed135ece665 Mon Sep 17 00:00:00 2001 From: mariannuar Date: Wed, 24 Jul 2024 17:52:24 +0000 Subject: [PATCH 2/4] feat: create tokens --- src/components/tokens/_tokens.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/tokens/_tokens.scss b/src/components/tokens/_tokens.scss index 60a9cc9..eee9534 100644 --- a/src/components/tokens/_tokens.scss +++ b/src/components/tokens/_tokens.scss @@ -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 { From a6e2722e1b36678b45c43c1dcceaef082b5d721c Mon Sep 17 00:00:00 2001 From: Mari Nez Date: Mon, 5 Aug 2024 10:17:25 -0600 Subject: [PATCH 3/4] fix(emulsif-237): add empty line at the end of yml file --- src/components/links/link/link.component.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/links/link/link.component.yml b/src/components/links/link/link.component.yml index 6870bea..ce48b2e 100644 --- a/src/components/links/link/link.component.yml +++ b/src/components/links/link/link.component.yml @@ -24,4 +24,4 @@ props: title: Link's attributes (optional) description: The attribute of the link. data: - target: '_blank' \ No newline at end of file + target: '_blank' From 6e7f9c0cf2d111a282eed58265c2f3d0494bde46 Mon Sep 17 00:00:00 2001 From: mariannuar Date: Mon, 5 Aug 2024 16:19:23 +0000 Subject: [PATCH 4/4] feat: create tokens --- src/components/tokens/_tokens.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/tokens/_tokens.scss b/src/components/tokens/_tokens.scss index a7f2e03..417bf08 100644 --- a/src/components/tokens/_tokens.scss +++ b/src/components/tokens/_tokens.scss @@ -1,6 +1,6 @@ /** * Do not edit directly - * Generated on Mon, 05 Aug 2024 16:15:34 GMT + * Generated on Mon, 05 Aug 2024 16:19:21 GMT */ :root {