Giter Site home page Giter Site logo

olton / metro4-react Goto Github PK

View Code? Open in Web Editor NEW
39.0 8.0 9.0 5.52 MB

Metro 4 for ReactJS. Build impressive responsive, mobile-first projects on the web with the first front-end component library in Metro Style and not only.

Home Page: https://react.metroui.org.ua

License: MIT License

HTML 0.17% JavaScript 29.26% CSS 70.57%
metro metro-ui metro4 react metro4-react metro-ui-css

metro4-react's Introduction

Metro 4 Components Library for React

Sleek, intuitive, and powerful front-end framework for faster and easier web development. Build responsive, mobile-first projects on the web with the first front-end component library in Metro Style.

v0.1.4

Status

Dependencies npm version License: MIT GitHub issues GitHub repo size in bytes GitHub code size in bytes Website

Releases

GitHub release GitHub release


Donation

Donations on Patreon


Awesome project backers


You can use boilerplate template for React project with Metro 4.

metro4-react's People

Contributors

olton avatar shonny-ua avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

metro4-react's Issues

Error in CRA with 0.1.3, can't compile experimental syntax.

Adding metro4-react to a create-react-app seems to fail like so

SyntaxError: C:\Users\kg\code\metro-example\node_modules\metro4-react\src\components\tag-input\tag-input.js: Support for the experimental syntax 'classProperties' isn't currently enabled (30:14):

  28 |     }
  29 | 
> 30 |     onChange = tags => {
     |              ^
  31 |         this.props.onChange(tags);
  32 |     };
  33 | 

Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL) to the 'plugins' section of your Babel config to enable transformation.

Just like in this issue #20, I suggest avoiding using experimental syntax or transpiling down to ES5 for npm releases.

Add Splitter to metro4-react

I was looking for a framework with a splitter and not many framework has this, I didn't fine anyone else had it. Unfortunately this isn't in the react package, is this something you would consider to add from Metro4?

Thanks for a great component library

Module not found: Can't resolve 'metro4-react'

my code like this

import React from 'react';
import logo from './logo.svg';

import {Grid,Row,Cell,Input} from 'metro4-react' ;

then resulting error

Failed to compile
./src/App.js
Module not found: Can't resolve 'metro4-react' in 'D:\react_test\m4_react\src'

please help me,
thanks

SyntaxError

My Code:
import {Button} from 'metro4-react'; <Button />
Actual:
/node_modules/metro4-react/src/components/tag-input/tag-input.js
SyntaxError: /home/marat/Code/website/node_modules/metro4-react/src/components/tag-input/tag-input.js: Unexpected token (142:12)

Experimental syntax breaks CRA applications

Hello, I've been trying to get metro4-react working with a CRA app, and I've run across an issue where usage of experimental babel syntax is causing issues.

Failed to compile.

./node_modules/metro4-react/src/components/collapse/collapse.jsx 10:24
Module parse failed: Unexpected token (10:24)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
| export default class Collapse extends React.Component {
>     static defaultProps = {
|         className: "collapse-css-transition",
|         style: {}

The issue I've had is exactly the same as material-components/material-components-web-react#107, so I won't repeat the conversation. :)

The issue is https://github.com/olton/Metro4-React/blob/master/.babelrc#L6, which cannot be enabled in a CRA without ejecting the app entirely.

Suggested solutions are:

Sorry I'm not really proficient enough to give much more specific suggestions.

Failed to compile when requare any parts

I use command > npm install metro4-react
and then:
import {Button} from "metro4-react";

import React, { Component } from 'react'
import {Button} from "metro4-react";

export default class App extends Component {
    render() {
        return (
            <div>
              <Button>Button</Button>
            </div>
        )
    }
}

How can I solve the following problem

Failed to compile
./node_modules/metro4-react/src/components/tag-input/tag-input.js
SyntaxError: E:\WWW\gitSearch\git-search\node_modules\metro4-react\src\components\tag-input\tag-input.js: Support for the experimental syntax 'jsx' isn't currently enabled (142:13):

140 |
141 | return (

142 | <div className={tag-input ${focus ? 'focused' : ''} ${staticMode ? 'static-mode' : ''}} ref={this.component}>
| ^
143 | {tags.map( (tag, index) => {
144 | return (
145 | <Tag

Add @babel/preset-react (https://git.io/JfeDR) to the 'presets' section of your Babel config to enable transformation.
If you want to leave it as-is, add @babel/plugin-syntax-jsx (https://git.io/vb4yA) to the 'plugins' section to enable parsing.
This error occurred during the build time and cannot be dismissed.Failed to compile
./node_modules/metro4-react/src/components/tag-input/tag-input.js
SyntaxError: E:\WWW\gitSearch\git-search\node_modules\metro4-react\src\components\tag-input\tag-input.js: Support for the experimental syntax 'jsx' isn't currently enabled (142:13):

140 |
141 | return (

142 | <div className={tag-input ${focus ? 'focused' : ''} ${staticMode ? 'static-mode' : ''}} ref={this.component}>
| ^
143 | {tags.map( (tag, index) => {
144 | return (
145 | <Tag

Add @babel/preset-react (https://git.io/JfeDR) to the 'presets' section of your Babel config to enable transformation.
If you want to leave it as-is, add @babel/plugin-syntax-jsx (https://git.io/vb4yA) to the 'plugins' section to enable parsing.
This error occurred during the build time and cannot be dismissed.

Tile component missing

Requesting to add Tile component as it is pretty important one. I feel metro design is incomplete with tile component.

Unable to find modules in the Electron/ React app

Hello,

I tried to compile it with Electron/React/Webpack and it fails after right after start

Compiled with problems:X
Error:
Module not found: Error: Can't resolve './src/components/container/container' in 'C:\electron\electron_react_test1\test1\node_modules\metro4-react'
Error:
Module not found: Error: Can't resolve './src/components/accordion/accordion' in 'C:\electron\electron_react_test1\test1\node_modules\metro4-react'

Metro4-React with Parcel

Hi I am trying to use Parcel with Metro4-React and I get the following build error when I try and import any Metro4-React component

@parcel/transformer-js: Expected ',', got 'className'

/Users/[email protected]/projects/OP2/node_modules/metro4-react/src/components/accordion/accordion.jsx:21:18
20 | return (

21 | <div className={'frame ' + (open ? 'active' : '') + ' ' + clsFrame}>
| ^^^^^^^^^
22 | <div className={'heading ' + clsFrameHeading} onClick={this.onHeadingClick}>{title}
23 |

Is it possible to use Parcel with Metro4-React?
Is there any specific configuration I need to add to either Parcel or elswhere

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.