1.0.32 • Published 4 months ago

serverkit-ide-lib v1.0.32

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

Serverkit ide library

Installation

You can install this package via npm:

npm install serverkit-ide-lib

Summary

  • Installation: Instructions for installing serverkit-ide-lib.
  • Usage: How to use Theme in an app, wrapping the entire application.
  • Component Examples in the example folder, each with a brief description, making it easier to locate and understand how to use each component.

Dialog Component

A Dialog component based on Radix UI's Dialog system, providing customizable content, layout, and controls.

Usage

Here's how to use the Dialog component, including examples of common props like isOpen, onClose, and title:

interface DialogProps {
    isOpen: boolean;
    onClose: () => void;
    title?: string | React.ReactNode;
    children: React.ReactNode;
    footer?: React.ReactNode;
    header?: React.ReactNode;
    body?: React.ReactNode;
    size?: 1 | 2 | 3 | 4 | 5;
    showCloseIcon?: boolean;
}

      <Button variant="classic" onClick={() => setDialogOpen(true)}>
        Open Dialog
      </Button>

      <Dialog
        isOpen={isDialogOpen}
        onClose={() => setDialogOpen(false)}
        title="Sample Dialog"
        footer={
          <Button variant="classic" onClick={() => setDialogOpen(false)}>
            Close
          </Button>
        }
        size={2}
        showCloseIcon={true}
      >
        <p>This is the dialog content.</p>
      </Dialog>

Button Component

A Button component based on Radix UI's Button system, supporting all Radix UI Button props.

Usage

Import and use the Button component in your app:

<Flex gap={"3"}>
  <Button variant="classic" onClick={() => setDialogOpen(true)}>
    Button
  </Button>
  <Button variant="surface" onClick={() => setDialogOpen(true)}>
    Button
  </Button>
</Flex>

Badge Component

A Badge component based on Radix UI's Badge system, supporting all Radix UI Badge props.

Usage

<Badge size={"3"} color="orange" variant="soft" children="Badge" />

Toast Component

A Toast component based on react-toastify

Usage

Props {
  content: string,
  type: "info" | "success" | "warning" | "error" = "info"
}

<Button onPress={()=> showToast('Toast conent','success')}>Show toast</Button>
1.0.19

8 months ago

1.0.18

8 months ago

1.0.17

8 months ago

1.0.16

8 months ago

1.0.2-7.rc-1

6 months ago

1.0.26-rc.1

6 months ago

1.0.22

7 months ago

1.0.21

7 months ago

1.0.20

8 months ago

1.0.26

6 months ago

1.0.25

6 months ago

1.0.24

6 months ago

1.0.23

7 months ago

1.0.2-9.rc-2

5 months ago

1.0.2-9.rc-1

5 months ago

1.0.29

5 months ago

1.0.28

5 months ago

1.0.27

6 months ago

1.0.32

4 months ago

1.0.31

5 months ago

1.0.30

5 months ago

1.0.24-rc.2

6 months ago

1.0.15

8 months ago

1.0.24-rc.1

6 months ago

1.0.14

8 months ago

1.0.21-rc.1

7 months ago

1.0.13

8 months ago

1.0.12

8 months ago

1.0.11

8 months ago

1.0.10

8 months ago

1.0.9

8 months ago

1.0.8

8 months ago

1.0.7

8 months ago

1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago