-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Description
I'm trying to make an example of my component in the Markdown file (.md). The problem is when I try to import something inside this markdown file:
import { validateEmail } from '../../utils/validation';
initialState = {
value: 'asdas',
}
function updateValue(name, value) {
setState({ [name]: value });
}
<Input
placeholder="Name"
value={value}
type="text"
required={true}
name="value"
onChangeFunction={updateValue}
validations={[validateEmail]}
/>;
When I go to the component it says:
Error: import or require() statements can be added only by editing a Markdown example file: ../../utils/validation
I tried also with require but it didn't work.
versions:
- react-styleguidist": "^9.0.3"
- "react": "^16.7.0",
Example of my project:
https://github.com/aimementoring/blueprint
branch: feature/validations
To reproduce
- download the project and execute:
- yarn
- yarn deploy
- serve -s styleguide
- go to the input component.
EvHaus, juandata, NathanQ, evgar and osmanov