1.0.18 • Published 11 months ago

@jswork/mantine-components v1.0.18

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

mantine-components

Mantine components for React.

version license size download

installation

npm install -S @jswork/mantine-components

usage

  1. import css

    @import "~@jswork/mantine-components/dist/style.css";
    
    // or use sass
    @import "~@jswork/mantine-components/dist/style.scss";
  2. import js

    import React, { useEffect } from 'react';
    import { Selection } from '@jswork/mantine-components';
    
    export default () => {
      const [checked, setChecked] = React.useState(true);
    
      // simulate a server response
      useEffect(() => {
        setTimeout(() => {
          console.log('server response received');
          setChecked(false);
        }, 1000);
      }, []);
    
      return (
        <div className="relative border w-4/5 mx-auto mt-10">
          <Selection value={checked} onChange={setChecked} label="I agree to the terms and conditions" />
          <hr />
          <Selection
            selectionType="radio"
            value={checked}
            onChange={setChecked}
            label="I agree to the terms and conditions"
          />
          <pre className="p-5 bg-gray-100">{JSON.stringify({ checked }, null, 2)}</pre>
        </div>
      );
    };

preview

license

Code released under the MIT license.

1.0.18

11 months ago

1.0.17

11 months ago

1.0.16

11 months ago

1.0.11

11 months ago

1.0.15

11 months ago

1.0.14

11 months ago

1.0.13

11 months ago

1.0.12

11 months ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago