Skip to content

Commit

Permalink
Added descriptions for Container Props UI Component (#5)
Browse files Browse the repository at this point in the history
* Added descriptions for Container Props UI Component

* Improved CI/CD Actions

* Update checks.yml

---------

Co-authored-by: Misha Topchilo <[email protected]>
  • Loading branch information
miksrv and miksrv authored Oct 2, 2024
1 parent 8bad167 commit 7616398
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .changeset/shiny-kangaroos-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@miksoft/simple-uikit': patch
---

Added descriptions for Container Props UI Component
15 changes: 1 addition & 14 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,7 @@ jobs:
node-version: 20
cache: 'npm'

- name: Cache node modules
uses: actions/cache@v4
id: cache-npm-storybook
with:
path: |
node_modules
~/.npm
key: ${{ runner.os }}-storybook-modules-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-storybook-modules-
${{ runner.os }}-
- if: ${{ steps.cache-npm-storybook.outputs.cache-hit != 'true' }}
name: Install dependencies for Storybook
- name: Install dependencies for Storybook
working-directory: storybook
run: npm install

Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ jobs:
run: yarn build

- name: Create .npmrc
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}
@miksrv:registry=https://npm.pkg.github.com/" > ~/.npmrc

- name: Create Release Pull Request or Publish to npm
id: changesets
Expand All @@ -43,3 +45,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish to GitHub Packages
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"prettier:fix": "prettier --write ."
},
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://npm.pkg.github.com/"
},
"access": "public",
"main": "dist/index.js",
Expand Down
9 changes: 9 additions & 0 deletions src/container/Container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,21 @@ import styles from './styles.module.sass'

import { concatClassNames as cn } from '@/tools'

/**
* Interface for the properties of a container component.
*/
export interface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {
/** The title of the container. Displayed at the top of the container */
title?: string
/** Additional class names to apply to the container */
className?: string
/** An action element, typically a button or link, displayed in the container header */
action?: React.ReactNode
/** Custom header content for the container */
header?: React.ReactNode
/** The content of the container */
children?: React.ReactNode
/** Custom footer content for the container */
footer?: React.ReactNode
}

Expand Down

0 comments on commit 7616398

Please sign in to comment.