Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
@debtcollective/dc-header-component
Advanced tools
This is a Web component built using Stencil to define the header for all debtcollective web apps.
Stencil is a compiler for building fast web apps using Web Components.
Stencil combines the best concepts of the most popular frontend frameworks into a compile-time rather than run-time tool. Stencil takes TypeScript, JSX, a tiny virtual DOM layer, efficient one-way data binding, an asynchronous rendering pipeline (similar to React Fiber), and lazy-loading out of the box, and generates 100% standards-based Web Components that run in any browser supporting the Custom Elements v1 spec.
Stencil components are just Web Components, so they work in any major framework or with no framework at all.
Currently, due to an issue with lerna and the local dependencies, in order to run this component locally you will need to do the following:
yarn remove @debtcollective/dc-dropdown-component
yarn add @debtcollective/dc-dropdown-component
yarn install
yarn start
In order to have a sense over the community session, you need to have the application running and make sure
community
prop variable match the application, likehttp://lvh.me:3000
. Ultimately, you will need to allow CORS on the community app in that sense: Admin > Settings > CORS > addhttp://lvh.me:3333
which suppose to be yourhost
prop. Check example below.
To build the component for production, run:
yarn build
To run the unit tests for the components, run:
yarn test
Need help? Check out our docs here.
When creating new component tags, we recommend not using stencil
in the component name (ex: <stencil-datepicker>
). This is because the generated component has little to nothing to do with Stencil; it's just a web component!
Instead, use a prefix that fits your company or any name for a group of related components. For example, all of the Ionic generated web components use the prefix ion
.
You can render the default styles with links you pass as props like:
<dc-header host="http://lvh.me:3333" community="http://lvh.me:3000" links='[{"href":"http://debtcollective.org/","text":"About us"}, {"href":"https://community.debtcollective.org/","text":"Community"}, {"href":"https://teespring.com/stores/debt-collective","text":"Store"}]'></dc-header>
Alternatively, you can choose to inject your own structure by doing something like:
<dc-header host="http://lvh.me:3333" community="http://lvh.me:3000">
<div slot="header">
<div class="nav-item d-md-flex">
<a class="nav-link" href='http://debtcollective.org/'>
About us
</a>
</div>
</div>
<div slot="menu">
<div class="nav-item">
<a class="nav-link" href='http://debtcollective.org/'>
About us (Just menu)
</a>
</div>
</div>
</dc-header>
NOTE: be aware of not adding the latest "/" on the url props such as host and community
if you need to use router link within the donate button you should set donateurl
to falsy value so the custom donate button will render alone
<dc-header donateurl="">
<div slot="donate">
<Link class="btn-donate">Donate</Link>
</div>
</dc-header>
<script type="module" src="https://unpkg.com/@debtcollective/dc-header-component@latest/dist/header/header.esm.js"></script>
in the head of your index.htmlnpm install dc-dropdown --save
<script src='node_modules/dc-dropdown/dist/dropdown.js'></script>
in the head of your index.htmlnpm install dc-dropdown --save
import dc-dropdown;
FAQs
Stencil header component for debtcollective web apps
The npm package @debtcollective/dc-header-component receives a total of 221 weekly downloads. As such, @debtcollective/dc-header-component popularity was classified as not popular.
We found that @debtcollective/dc-header-component demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.