Commit 10837ec0 authored by Ola Johannessen Kruge's avatar Ola Johannessen Kruge
Browse files

changed selections to send different props to mediatype-component

parent a9398561
import React from 'react';
import Mediatype from './Mediatype/Mediatype' ;
const Selection = () => {
const postSelections = (category) => {
var categories = ["Category1", "Category2", "Category3", "Category4", "Category5", "Category6", "Category7", "Category8", "Category9"]
const Selection = (props) => {
return (
<div id="category-div">
<h1> Select categories to show </h1>
<form id="categories-field">
{ => (
<input name={category} onClick={() => this.postSelections(category)}></input>
<div id="selections">
<h3>Select songs</h3>
<Mediatype {...props} type={"audio"} values= {["animals", "laughs", "nature"]}></Mediatype>
<h3>Select figures</h3>
<Mediatype {...props} type={"figures"} values= {["business", "social", "space"]}></Mediatype>
<h3>Select texts</h3>
<Mediatype {...props} type={"texts"} values= {["jokes", "quotes", "songs"]}></Mediatype>
export default Selection;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment