import { ChannelFragment } from "@saleor/fragments/types/ChannelFragment"; import { makeStyles } from "@saleor/macaw-ui"; import { ChannelProps } from "@saleor/types"; import { mapNodeToChoice } from "@saleor/utils/maps"; import React from "react"; import SingleSelectField from "../SingleSelectField"; const useStyles = makeStyles( theme => ({ root: { "&& fieldset": { borderColor: theme.palette.divider }, marginRight: theme.spacing(2), width: 192 } }), { name: "AppChannelSelect" } ); export interface AppChannelSelectProps extends ChannelProps { channels: ChannelFragment[]; disabled: boolean; onChannelSelect: (id: string) => void; } const AppChannelSelect: React.FC = ({ channels, disabled, onChannelSelect, selectedChannelId }) => { const classes = useStyles({}); return (
onChannelSelect(event.target.value)} />
); }; AppChannelSelect.displayName = "AppChannelSelect"; export default AppChannelSelect;