D10221 / milligrami

JSX Milligram wrapper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JSX Milligram wrapper

doesnt include 'milligram.css'

from consumer

'@import '~milligram/dist/milligram.css';

or directly into "index.html"

<link src-"somewhere/milligram.css"/>

Usage:

import { Button } from "milligrami"

const App = () => (
    <div>
        <Button> OK </Button>
        <Button outline> Outline </Button>
        <Button clear> Clear </Button>
    </div>
);

Note: All elements are doing pretty much the same,

  • props are passed down to (in this case) the <button/> Tag
    only the className is appended with the respective Milligram css-class

      <Button  type="submit" outline className="extra-class"/>
    

should render

<button type-"submit" class="extra-class button button-outline">
    <!-- children ? -->
<button>

Compatibillity

it works on my computer

About

JSX Milligram wrapper


Languages

Language:JavaScript 97.8%Language:Shell 2.2%