1.0.4 • Published 12 months ago

spark-admin-ui v1.0.4

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

Spark-admin ui

Spark-admin ui is a component library specifically developed to seamlessly integrate with the Spark-admin CMS, enhancing its functionality and user experience.

Currently, two official plugins are available:

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
export default {
  // other rules...
  parserOptions: {
    ecmaVersion: "latest",
    sourceType: "module",
    project: ["./tsconfig.json", "./tsconfig.node.json"],
    tsconfigRootDir: __dirname,
  },
};
  • Replace plugin:@typescript-eslint/recommended to plugin:@typescript-eslint/recommended-type-checked or plugin:@typescript-eslint/strict-type-checked
  • Optionally add plugin:@typescript-eslint/stylistic-type-checked
  • Install eslint-plugin-react and add plugin:react/recommended & plugin:react/jsx-runtime to the extends list

Usage

Spark-admin default button:

import { DefaultButton } from "spark-admin-ui";

export const exampleFunc = () => {
  <div>
    <DefaultButton text="Example" buttonType="regular" margin="8px" />
  </div>;
};
  • You can also pass the onClick function in props.
  • Variations of button types: regular, transparent, regular--small, regular--xs, regular--text.

Spark-admin link button:

import { LinkButton } from "spark-admin-ui";

export const exampleFunc = () => {
  <div>
    <LinkButton href="/" text="example" buttonType="regular" margin="8px" />
  </div>;
};
  • Variations of button types: regular, regular--bigger, transparent, transparent--small, regular--small, regular--xs, card--button.

Spark-admin popup image form:

import { ImageForm } from "spark-admin-ui";

export const exampleFunc = () => {
  return (
    <div>
      <ImageForm
        onClick={}
        componentId=""
        handleDragOver={}
        handleDrop={}
        handleFileChange={}
        handleSubmit={}
        fileName=""
      />
    </div>
  );
};
1.0.4

12 months ago

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

1 year ago

1.0.0

1 year ago