Skip to content

Commit

Permalink
Merge pull request #142 from emulsify-ds/emulsif-242-convert-status-t…
Browse files Browse the repository at this point in the history
…o-support-sdc

EMULSIF-242: Convert Status to support SDC
  • Loading branch information
callinmullaney authored Aug 28, 2024
2 parents b4ab5ea + 0b61f96 commit 20e4374
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 12 deletions.
65 changes: 65 additions & 0 deletions src/components/status/status.component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
$schema: https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json

name: Status
group: Components
status: stable
props:
type: object
required:
- message_list
properties:
presentational:
type: boolean
title: Presentational
description: 'Indicates if the component is purely presentational'
data: true
attributes:
type: string
title: Attributes
description: 'Additional attributes for the component'
data: ''
message_list:
type: object
title: Message List
description: 'A list of messages with their types'
properties:
info:
type: object
title: Info Message
description: 'An informational message'
properties:
message:
type: string
title: Message
description: 'The content of the info message'
data: 'This is an info message'
danger:
type: object
title: Danger Message
description: 'A danger or error message'
properties:
message:
type: string
title: Message
description: 'The content of the danger message'
data: 'This is a danger message'
success:
type: object
title: Success Message
description: 'A success message'
properties:
message:
type: string
title: Message
description: 'The content of the success message'
data: 'This is a success message'
warning:
type: object
title: Warning Message
description: 'A warning message'
properties:
message:
type: string
title: Message
description: 'The content of the warning message'
data: 'This is a warning message'
4 changes: 3 additions & 1 deletion src/components/status/status.stories.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import status from './status.twig';
import { props } from './status.component.yml';
import { mapDataToTwig } from '../../util/dataTransformers';

import statusData from './status.yml';
const statusData = mapDataToTwig(props.properties);

/**
* Storybook Definition.
Expand Down
11 changes: 0 additions & 11 deletions src/components/status/status.yml

This file was deleted.

0 comments on commit 20e4374

Please sign in to comment.