ligo/tools/webide/packages/client/src/components/evaluate-value-pane.tsx
Jev Björsell c119c44c13
Import webide into main ligo monorepo
When this is merged https://gitlab.com/ligolang/ligo-web-ide/ will be
marked as deprecated.

This MR does not hook up the webide build to the main CI. The CI
integration will come in a subsequent MR for the sake of making review
easier.
2020-02-06 19:04:18 -08:00

32 lines
880 B
TypeScript

import React from 'react';
import { useDispatch, useSelector } from 'react-redux';
import styled from 'styled-components';
import { AppState } from '../redux/app';
import { ChangeEntrypointAction, EvaluateValueState } from '../redux/evaluate-value';
import { Group, Input, Label } from './inputs';
const Container = styled.div``;
export const EvaluateValuePaneComponent = () => {
const dispatch = useDispatch();
const entrypoint = useSelector<AppState, EvaluateValueState['entrypoint']>(
state => state.evaluateValue.entrypoint
);
return (
<Container>
<Group>
<Label htmlFor="entrypoint">Entrypoint</Label>
<Input
id="entrypoint"
value={entrypoint}
onChange={ev =>
dispatch({ ...new ChangeEntrypointAction(ev.target.value) })
}
></Input>
</Group>
</Container>
);
};