Skip to content

Files

Latest commit

 

History

History

mml-react-types

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

MML React Types

@mml-io/mml-react-types

npm version

This package contains TypeScript types for MML React components to allow for type checking and suggestions of MML elements and attributes in TypeScript projects.

Usage

Installation

  npm install @mml-io/mml-react-types --save-dev

Add "@mml-io/mml-react-types" to the types field in the compilerOptions group of your tsconfig.json file:

{
  [...]
  "compilerOptions": {
    [...]
    "types": ["react", "react-dom", "@mml-io/mml-react-types"]
  }

Example

import React from 'react';

export function MyComponent() {
  return (
    <m-group>
      <m-cube width={1} height={2} depth={3} color={"red"}  />
    </m-group>
  );
}