diff --git a/src/components/AddOption.js b/src/components/AddOption.js index c26024e..89ca39f 100644 --- a/src/components/AddOption.js +++ b/src/components/AddOption.js @@ -20,9 +20,9 @@ export default class AddOption extends React.Component { render () { return (
- {this.state.error &&
{this.state.error}
} -
- + {this.state.error &&
{this.state.error}
} + +
diff --git a/src/components/Option.js b/src/components/Option.js index 6ba879c..55b3b4e 100644 --- a/src/components/Option.js +++ b/src/components/Option.js @@ -2,13 +2,13 @@ import React from 'react' const Option = (props) => { return ( -

- {props.optionText} +

+

{props.count}. {props.optionText}

-

+
) } // End of Option stateless functional component definition diff --git a/src/components/OptionModal.js b/src/components/OptionModal.js new file mode 100644 index 0000000..50ca1d1 --- /dev/null +++ b/src/components/OptionModal.js @@ -0,0 +1,16 @@ +import React from 'react' +// Third Party Components +import Modal from 'react-modal' + +const OptionModal = (props) => ( + +

Selected Option

+

{props.selectedOption}

+
+) + +export default OptionModal diff --git a/src/components/Options.js b/src/components/Options.js index 634c822..ab11516 100644 --- a/src/components/Options.js +++ b/src/components/Options.js @@ -27,11 +27,12 @@ const Options = (props) => { } { props.options.length > 0 && - props.options.map((option) => { + props.options.map((option, index) => { return (