Skip to content

Commit

Permalink
feat(emulsif-231): convert audio player to support sdc
Browse files Browse the repository at this point in the history
  • Loading branch information
Mari Nez committed Jul 17, 2024
1 parent a2cf541 commit 3c3b41e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
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.

0 comments on commit 3c3b41e

Please sign in to comment.