Naturally Pacifist Marsupials
    Wondering what’s next for npm?Check out our public roadmap! »

    @softwarefactory-project/re-patternfly

    2.0.3 • Public • Published

    re-patternfly

    ReasonML/ReScript binding for patternfly.

    Features

    Components (generated from the typescript interfaces):

    • AboutModal
    • Accordion
    • Alert
    • AlertGroup
    • ApplicationLauncher
    • Avatar
    • Backdrop
    • BackgroundImage
    • Badge
    • Banner
    • Brand
    • Breadcrumb
    • Button
    • Card
    • Checkbox
    • ClipboardCopy
    • DateList
    • DatePicker
    • DescriptionList
    • Divider
    • Drawer
    • Drawer
    • Dropdown
    • EmptyState
    • Form
    • Hint
    • Label
    • LabelGroup
    • List
    • LoginPage
    • Menu
    • Nav
    • Page
    • Radio
    • Select
    • Spinner
    • Tabs
    • Text
    • TextArea
    • TextInput
    • Tile
    • Title
    • Toolbar
    • Tooltip

    Layouts:

    • Bullseye
    • Gallery
    • Grid
    • Level
    • Split
    • Stack

    Table component supports this data definition:

    let make = () => {
      let columns = [|
        {title: "job", transforms: [|sortable|]},
        {title: "result", transforms: [|sortable|]},
      |];
      let (rows, setRows) =
        React.useState(_ =>
          [|
            {cells: [|"rpmbuild", "success"|]},
            {cells: [|"rpmtest", "failure"|]},
          |]
        );
      let onSort = _ => setRows(_ => Belt.Array.reverse(rows));
    
      <Table caption="Sortable Table" rows cells=columns onSort>
        <TableHeader />
        <TableBody />
      </Table>;
    };

    Install

    Add to your package.json:

    pnpm add @softwarefactory-project/re-patternfly
    

    Add to your bsconfig.json:

    "bs-dependencies": [
    +  "@softwarefactory-project/re-patternfly"
    ]

    Example

    @react.component
    let make = () => {
      <Patternfly.List>
        <Patternfly.ListItem>
          {"Hello patternfly!" |> React.string}
        </Patternfly.ListItem>
      </Patternfly.List>
    };

    See the demo directory for a starter project.

    Contribute

    Contributions are most welcome, for example the project needs help to:

    • bind more component.
    • better documentation and demo project.

    Get started by running:

    git clone https://github.com/softwarefactory-project/re-patternfly
    cd re-patternfly
    pnpm install
    pnpm start

    Then build and run tests with pnpm test.

    Make sure to read about React and ReScript too.

    Changes

    2.0.3

    • Add missing Select callback for typeahead multi selection

    2.0.2

    • Add DataList
    • Add Select
    • Add missing onSelect callback

    2.0.1

    • Add DatePicker
    • Add Tooltip
    • Add TextInput placeholder
    • Add Toolbar and InputGroup

    2.0.0

    • Replace reason-react with rescript/react
    • Replace yarn package manager with pnpm

    1.0.0

    • Initial release

    Install

    npm i @softwarefactory-project/re-patternfly

    DownloadsWeekly Downloads

    123

    Version

    2.0.3

    License

    Apache-2.0

    Unpacked Size

    172 kB

    Total Files

    8

    Last publish

    Collaborators

    • avatar