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-231: Convert Audio player to support SDC #129

Merged
Show file tree
Hide file tree
Changes from all 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
18 changes: 18 additions & 0 deletions src/components/audio-player/audio-player.component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# ball audio file by marini24 under CC 3.0
$schema: https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json

name: Audio Player
group: Components/Media
status: stable
props:
type: object
required:
- audio_content
properties:
audio_content:
type: array
title: Audio player content
description: The content of the audio players.
data:
- '../../media/ball.ogg'
- '../../media/ball.mp3'
6 changes: 4 additions & 2 deletions src/components/audio-player/audio-player.stories.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import template from './audio-player.twig';
import audioData from './audio-player.yml';
import { props } from './audio-player.component.yml';
import figma from '../../../.storybook/configma.json';

const audioData = props.properties.audio_content.data;

export default {
title: 'Components/Media/Audio Player',
};

export const AudioPlayer = () => template(audioData);
export const AudioPlayer = () => template({ audio_content: audioData });

AudioPlayer.parameters = {
design: {
Expand Down
4 changes: 0 additions & 4 deletions src/components/audio-player/audio-player.yml

This file was deleted.

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 Mon, 05 Aug 2024 16:30:15 GMT
* Generated on Fri, 16 Aug 2024 00:35:36 GMT
*/

:root {
Expand Down