diff --git a/.github/workflows/generate_api_doc.yml b/.github/workflows/generate_api_doc.yml new file mode 100644 index 000000000..10053fdd5 --- /dev/null +++ b/.github/workflows/generate_api_doc.yml @@ -0,0 +1,40 @@ +name: Generate API DOC + +on: + push: + branches: [ master ] + paths: + - '**/**/*.d.ts' + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [16.x] + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Install node packages + run: npm install + + - name: Generate api doc + run: npm run apidoc + + - name: Commit doc + run: | + git config user.name "GitHub Actions Bot" + git config user.email "<>" + git commit -a -m "Update API doc" + git push diff --git a/components/button/Button.d.ts b/components/button/Button.d.ts index d4b9da010..e4c8e8de4 100755 --- a/components/button/Button.d.ts +++ b/components/button/Button.d.ts @@ -32,7 +32,7 @@ export interface ButtonProps extends ButtonHTMLAttributes { icon?: string | undefined; /** * Position of the icon. - * @defaultValue 'left' + * @defaultValue left */ iconPos?: 'left' | 'right' | 'top' | 'bottom' | undefined; /** diff --git a/doc/common/apidoc/index.json b/doc/common/apidoc/index.json index bf3c11411..3a3aaa059 100644 --- a/doc/common/apidoc/index.json +++ b/doc/common/apidoc/index.json @@ -3629,7 +3629,7 @@ "optional": true, "readonly": false, "type": "\"left\" | \"top\" | \"bottom\" | \"right\"", - "default": "'left'", + "default": "left", "description": "Position of the icon." }, {