refactor: module

This commit is contained in:
cha0s 2022-03-18 12:47:48 -05:00
parent a886ac2793
commit dc7926ed27
3 changed files with 15 additions and 8 deletions

View File

@ -1,17 +1,17 @@
import './component.scss';
import {BinaryController} from '@avocado/resource-persea';
import {
PropTypes,
React,
} from '@flecks/react';
import locals from './component.module.scss';
export const AudioComponent = ({resource}) => {
// eslint-disable-next-line no-use-before-define
const buffer = BinaryController.toBuffer(resource);
const objectUrl = URL.createObjectURL(new window.Blob([buffer]));
return (
<div className="audio">
<div className={locals.audio}>
{/* eslint-disable-next-line jsx-a11y/media-has-caption */}
<audio
controls

View File

@ -0,0 +1,12 @@
.audio {
display: flex;
flex-direction: column;
height: 100%;
padding: 1em;
width: 100%;
audio {
flex-grow: 1;
width: 100%;
}
}

View File

@ -1,5 +0,0 @@
.audio {
height: 100%;
padding: 1em;
width: 100%;
}