Code Monkey home page Code Monkey logo

suggestionbox's Introduction

Suggestion box

Suggestion box for Project Trans's website.

Usage

# Or npm, yarn, bun, etc.
pnpm add @project-trans/suggestion-box
pnpm add @iconify-json/octicon -D # Suggestion Box uses octicon.

In your Vue component:

<template>
  <SuggestionBox
    target-url="https://example.com"
    contact-content-placeholder="联系方式占位符"
    text-content-placeholder="文本内容占位符"
    attach-image-button-text="附加图片按钮文案"
    send-button-text="发送按钮文案"
    sending-button-text="发送中按钮文案"
    sent-success-button-text="发送成功按钮文案"
    sent-failed-button-text="发送失败按钮文案"
  />
</template>

<script>
import SuggestionBox from '@project-trans/suggestion-box';
import '@project-trans/suggestion-box/dist/style.css';
</script>

In uno.config.ts:

import { defineConfig, presetUno, presetIcons } from 'unocss';
import presetSBox from '@project-trans/suggestion-box/dist/preset';

export default defineConfig({
  // ...
  content: {
    pipeline: {
      include: [
        // Default match pattern of UnoCSS
        /\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/,
        // Match suggestion-box
        /.*pjts-suggestion-box.*\.js/,
      ],
    },
  },
  presets: [
    // SuggestionBox uses presetUno
    presetUno(),
    // SuggestionBox uses presetIcons
    presetIcons(),
    // SuggestionBox's own rules
    presetSBox(),
  ],
});

Development

corepack enable

Install dependencies

pnpm install

Start UI development server

pnpm dev

Start Cloudflare Pages Functions development server

pnpm -F server dev

suggestionbox's People

Contributors

beiyanyunyi avatar littlesound avatar nekomeowww avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.